4 ms·
JavaScript itself is not async. It's the programs/engines that runs the scripting language that have decided to make it async with callbacks. For example Micros
by z3t4 6y ago
JavaScript itself is not async. It's the programs/engines that runs the scripting language that have decided to make it async with callbacks. For example Microsoft JS is not async.
* ES2022? do have some garbage collection hook that uses a callback, so if that makes it into the standard you could say that JS/ES is async. JavaScript itself does not (yet) have any async functions.
- zzbzq 6y ago'Async' here refers not only to the keyword but also to what is achieved, in classic javascript, through callback functions
- z3t4 6y agoEven though there is the async keyword and Promise() there are no async functions nor callbacks in JavaScript itself. For example setInterval and setTimeout is not part of the language and needs to be implemented by the runtime/program that runs the JavaScript.