Is there another way of achieving the same behavior of scheduling a callback function on the JavaScript's message queue to be run after the current stack is empty?
In other words, is there a way, be it with Promises or third-party packages to push a callback to the task queue so that it runs after the current stack is empty?
In other words, what are some equivalents/alternatives to passing 0 to setTimeout to take advantage of the asynchronous callback?
Answers for all environments and all ECMAScript versions are welcome.