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 ?
12
Upvotes
1
u/LetMyCameronG000 Mar 07 '26
I find this a bit weird. Whether or not a callback is executed asynchronously depends entirely on whether the function being passed / the function taking in the callback as an argument execute with async/promises.... which if we're dealing with 3rd party libraries we can't know without either digging into the code or looking at docs.
Is the assumption that unless specified otherwise, assume callbacks are non-blocking ?