3 ms·
It's a bit misleading way to put it, but more or less correct when talking about client-side JavaScript. There are essentially no blocking calls, so a "synchron
by shangaslammi 15y ago
It's a bit misleading way to put it, but more or less correct when talking about client-side JavaScript. There are essentially no blocking calls, so a "synchronous" function in this context just means a normal function which directly returns a value and "asynchronous" means a function that takes a callback.
What the quoted bit boils down to is that any function that returns normally can be converted into a function that calls a callback, but not the other way around.