In the browser, callbacks are mostly synchronous with the exception of:
event handlers
request-response handlers
timer callbacks (setTimeout, clearTimeout)
But even in Node.js you have many synchronous callbacks, which you may not know as "callbacks". In particular, callbacks for iterating arrays, i.e. forEach, map, reduce.
In the browser, callbacks are mostly synchronous with the exception of:
But even in Node.js you have many synchronous callbacks, which you may not know as "callbacks". In particular, callbacks for iterating arrays, i.e. forEach, map, reduce.
Thanks buddy