Source code

Revision control

Copy as Markdown

Other Tools

{"version":3,"file":"step-over-for-of-closure.js","sources":["rollup-babel7://./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":["vals","root","console","log","val"],"mappings":";;;EAAA;EACA;EACA,IAAMA,OAAO,CAAC,CAAD,EAAI,CAAJ,CAAb;AAEA,EAAe,SAASC,IAAT,GAAgB;EAC7BC,UAAQC,GAAR,CAAY,YAAZ;;EAD6B;EAGxB,QAAMC,MAAOJ,IAAP,IAAN;EACHE,YAAQC,GAAR,CAAY,aAAZ,EAA4B;EAAA,aAAMC,GAAN;EAAA,KAAD,EAA3B;EAJ2B;;EAG7B,wBAAkBJ,IAAlB,eAAwB;EAAA;EAEvB;;EAEDE,UAAQC,GAAR,CAAY,MAAZ;EACD;;;;;;;;"}