swc_ecma_compat_es2015

Function block_scoping

source
pub fn block_scoping(unresolved_mark: Mark) -> impl Pass
Expand description

TODO(kdy1): Optimization

let functions = [];
for (let i = 0; i < 10; i++) {
   functions.push(function() {
       let i = 1;
       console.log(i);
   });
}