Re:Write logic, not mechanics
by shangaslammi on Thursday April 19, 2012 @07:22AM
(#3862394)
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.
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.