Skip to content

Instantly share code, notes, and snippets.

@vdanchenkov
Last active September 17, 2016 00:28
Show Gist options
  • Save vdanchenkov/4b4964e03a02c2d7a7dd434314bf538b to your computer and use it in GitHub Desktop.
Save vdanchenkov/4b4964e03a02c2d7a7dd434314bf538b to your computer and use it in GitHub Desktop.
Chrome Canary eats your stack due to tail call optimization http://www.2ality.com/2015/06/tail-call-optimization.html
(function () {
"use strict"
const a = () => '' + b()
const b = () => c()
const c = () => d()
const d = () => new Error().stack
console.log(a())
})()
/*
Error
at d (<anonymous>:7:17)
at a (<anonymous>:4:22)
at <anonymous>:9:13
at <anonymous>:10:3
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment