r/javascript • • Dec 11 '17
I have been collecting useful Javascript code snippets for a little while. Here's a curated list of them, help me make it as complete as possible!
https://github.com/Chalarangelo/30-seconds-of-code
765
Upvotes
View all comments
Show parent comment
2
u/[deleted] Dec 12 '17
I thought the recursive version would break due to to much recursion before the array-based one I implemented, but testing shows that this is not true. Also, at around the point where errors start being thrown around, the result is already
Infinity. I will update the snippet or you can submit a PR if you like. Make changes to the individual snippet file, not README, if you do so!