is it possible that tailrec functions in JS are no...
# javascript
r
is it possible that tailrec functions in JS are not optimised? I just got a Maxium call stack size exceeded
d
https://kotlinlang.org/docs/reference/functions.html
To be eligible for the tailrec modifier, a function must call itself as the last operation it performs. You cannot use tail recursion when there is more code after the recursive call, and you cannot use it within try/catch/finally blocks. Currently tail recursion is only supported in the JVM backend.
👍 1