Jeremy Martin (2014-02-14T16:03:16.000Z)
domenic at domenicdenicola.com (2014-02-20T01:16:51.465Z)
I rather hate to say it, but I would've actually expected: 4) Given that the eval'd string doesn't create anything typically considered a "block", the let binding would survive past the completion of the eval in non-strict mode: (function() { eval(" var answer=42; let localToEval = true; "); console.log(answer); // 42 console.log(localToEval); // true )(); (function() { "use strict"; eval(" var answer=42; let localToEval = true; "); console.log(answer); // ReferenceError: answer is not defined console.log(localToEval); // ReferenceError: localToEval is not defined )(); I'm not necessarily arguing for that behavior, but weighing in since that's the behavior I would have expected based on existing ES5 strict/non-strict/eval and ES6 let semantics...