The audacity to do such a thing…

@lorty@lemmy.ml
cake
link
fedilink
231Y

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);
}
@pingveno@lemmy.ml
link
fedilink
12
edit-2
1Y
for(var i = 0; i < numLoops; i++) {
    eval("var_" + i + " = " + i + ";");
}

eval is a path to powers many would consider to be… unnatural

Is it possible to learn this power?

Not from ES6

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 120 users / day
  • 257 users / week
  • 744 users / month
  • 3.72K users / 6 months
  • 1 subscriber
  • 1.48K Posts
  • 32.6K Comments
  • Modlog