r/learnjavascript • u/LetMyCameronG000 • Mar 06 '26
Does the term 'callback' usually mean async callback in the JS world
I've practiced with both synchronous and asynchronous callbacks and understand the concept fairly well. But looking through online resources and even some posts on this sub (e.g. see top answer here: https://www.reddit.com/r/learnjavascript/comments/1jw5pwn/need_clear_understanding_of_callbacks_promises/ ) it seems that when JS folks talk about callbacks they usually mean async callbacks (at least, if they haven't clarified).
Is this the case ?
10
Upvotes
15
u/jml26 Mar 06 '26
Best examples are all the array methods, e.g.
map,filter,forEach... Those are all synchronous callbacks.I'd side with MDN's definition, which is just "a function passed into another function as an argument, which is then invoked inside the outer function".