Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Only Safari browser actually supports tail optimization, so it is better to think that JS does not support it at all.
JS does support tail call optimization. This solution however is not tail recursive, so will eventually cause a stack overflow if n is sufficiently large.
JS does support tail call optimization. This solution however is not tail recursive, so will eventually cause a stack overflow if n is sufficiently large.
Thank you.
I'm not familiar enough with JS to confirm if this is good practice, in the sense that :
nice
This comment is hidden because it contains spoiler information about the solution