Tutorial by Examples

TCO is only available in strict mode As always check browser and Javascript implementations for support of any language features, and as with any javascript feature or syntax, it may change in the future. It provides a way to optimise recursive and deeply nested function calls by eliminating the n...
Tail Call Optimisation makes it possible to safely implement recursive loops without concern for call stack overflow or the overhead of a growing frame stack. function indexOf(array, predicate, i = 0) { if (0 <= i && i < array.length) { if (predicate(array[i])) { return...

Page 1 of 1