this post was submitted on 01 Oct 2023
476 points (96.7% liked)

Programmer Humor

32464 readers
518 users here now

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

Rules:

founded 5 years ago
MODERATORS
 

The audacity to do such a thing…

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 14 points 1 year ago (2 children)

Or in JavaScript you can build a string that creates the name of a variable in a sub loop by concatenating ""variable"+$i" and passing that value into a variable that is then read as the name of an incremental variable that a value is then passed to.

This has the advantage of being both extremely unwieldy and highly inscrutable, and there's a small chance it will make your coworkers send you death threats in slack.

[–] [email protected] 5 points 1 year ago

JavaScript: They were so focused on whether or not they could that they forgot to consider whether or not they should

[–] [email protected] 1 points 1 year ago

I once created a system to automatically load and execute arbitrary JS files and any exported functions in them as part of a server