UNPKG

defs

Version:

Static scope analysis and transpilation of ES6 block scoped const and let variables, to ES3.

12 lines (9 loc) 190 B
"use strict"; // v8 --harmony correctly prints 0 1 2: var arr = []; for (let x in [0,1,2]) { arr.push(function() { console.log(x); }); } arr.forEach(function(f) { f(); });