Source code

Revision control

Copy as Markdown

Other Tools

{"version":3,"file":"step-over-for-of-closure.js","sources":["rollup://./step-over-for-of-closure/input.js"],"sourcesContent":["// Babel will convert the loop body to a function to handle the 'val' lexical\n// enclosure behavior.\nconst vals = [1, 2];\n\nexport default function root() {\n console.log(\"pause here\");\n\n for (const val of vals) {\n console.log(\"pause again\", (() => val)());\n }\n\n console.log(\"done\");\n}\n"],"names":[],"mappings":";;;EAAA;EACA;EACA,MAAM,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;;AAEpB,EAAe,SAAS,IAAI,GAAG;EAC/B,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;;EAE5B,EAAE,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;EAC1B,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC;EAC9C,GAAG;;EAEH,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;EACtB,CAAC;;;;;;;;"}