The audacity to do such a thing…

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
  • 64 users / day
  • 250 users / week
  • 420 users / month
  • 2.88K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.9K Comments
  • Modlog