Conversation started Dec 12, 2016 at 17:35.
Dec 12, 2016 17:35
Can you use recursion in JavaScript? The following code is throwing a call stack exception f=n=>n==3?true:f(n++) calling f(1). Also, let me know if this is not the place to ask.
You should be using ++n
Try f(++n) instead since when you call f(n++) the original value of n(1) is passed to f and then n is incremented
n++ evaluates to n and increment n
semi-ninja'd
@KritixiLithos Half-ninja'd?
Dec 12, 2016 17:37
ninja sandwich
Ninja'd
Re-ninja'd
double-semi-ninja'd
super-ninja ronpa 2: goodbye ninjas
Ha, nice. Thanks, that worked
*kills all the ninjas*
 
Conversation ended Dec 12, 2016 at 17:44.