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

JavaScript

2337 readers
7 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.

top 1 comments
sorted by: hot top controversial new old
[–] FizzyOrange 6 points 1 day 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".