2015 • Features: arrow functions / classes / promise / let / const / template literals / generators / proper tail calls etc… • You can try some of them with recent implementations or compilers (e.g. Babel, Traceur)
called • Includes arguments, return address, etc… • Size is limited → We reached that limit when we call fact(100,000) ộ n = 97 n = 98 n = 99 n = 100 ộ
some conditions… • strict mode, normal function or arrow function, etc… • ECMAScript 2015 requires that a call in tail position will reuse the caller’s stack space!! • Differs from tail call optimization
• Reduce stack size / memory footprint • Performance improvements • Less processing when returning value • But maybe slower than for-loop → Better performance with beautiful code!