this post was submitted on 05 May 2025
9 points (100.0% liked)

JavaScript

2337 readers
14 users here now

founded 2 years ago
MODERATORS
 

I stumbled on the exact same issue described at the end of the "The same issue, but with web platform functions" section today, thought it might be worth sharing that article here.

you are viewing a single comment's thread
view the rest of the comments
[–] FizzyOrange 6 points 20 hours ago

It's good advice for JavaScript because JavaScript really fucked this up. But it's a bit confused to say "don't use functions as callbacks unless they were designed for it".

The problem isn't really even directly related to callbacks.

A better way to state it would be "don't pass extra arguments to functions that don't use use them".