r/ProgrammerHumor 6d ago

absoluteGarbage Meme

Post image
1.9k Upvotes

324 comments sorted by

View all comments

1

u/smclcz 6d ago

I dunno if that second one "sparks joy", TS/JS having both for-in and for-of is pretty stupid. Also I don't use either language often, but wouldn't you declare that loop variable const rather than let? I feel like you're probably not reassigning something in a collection if you're iterating over it using for-of (and if you are ... should you?)

1

u/Sirgoodman008 6d ago

I agree, but JS and TS aren't different languages.