Albin Jose@suppo.fi to Programmer Humor@lemmy.ml · 1 year agoHow dare you ask this? Was it just to get into a programming memes page?suppo.fiimagemessage-square68fedilinkarrow-up1493arrow-down117file-text
arrow-up1476arrow-down1imageHow dare you ask this? Was it just to get into a programming memes page?suppo.fiAlbin Jose@suppo.fi to Programmer Humor@lemmy.ml · 1 year agomessage-square68fedilinkfile-text
minus-squarelorty@lemmy.mllinkfedilinkarrow-up23·1 year agoIt would probably be way easier than expected to do so in javascript. It would also be awful.
minus-squareFeathercrown@lemmy.worldlinkfedilinkarrow-up16·edit-21 year agofor(var i=0; i \< numLoops; i++){ globalThis['example'+i] = doStuff(i); }
minus-squarepingveno@lemmy.mllinkfedilinkarrow-up12·edit-21 year agofor(var i = 0; i < numLoops; i++) { eval("var_" + i + " = " + i + ";"); }
minus-squareFeathercrown@lemmy.worldlinkfedilinkEnglisharrow-up10·1 year agoeval is a path to powers many would consider to be… unnatural
It would probably be way easier than expected to do so in javascript. It would also be awful.
for(var i=0; i \< numLoops; i++){ globalThis['example'+i] = doStuff(i); }
for(var i = 0; i < numLoops; i++) { eval("var_" + i + " = " + i + ";"); }
eval
is a path to powers many would consider to be… unnaturalIs it possible to learn this power?
Not from ES6