Hello .I want to understand how asynchronization works to the end, for this I decided to create a plugin that will be invoked asynchronously, I can not find examples to call methods in an asynchronous way.Who can help ?

2 Answers 2

In browser javascript, a large number of synchronous operations, an example of asynchronous operations can serve as XMLHttpRequest, Fetch, setTimeout&etc.Quite simply, callback is called when it is ready.
right here a man very soulfully and sensibly answers your question.
  • I would not say that, after all this, you deal with asynchrony, but the material is good. – Epic Military Sep 23 '17 at 13:14
  • Epic Military, and what questions are left after that?
    • What is asynchronous code?
      This is code outside of call stack.

    • How to write asynchronous code?
      Take out the call stack.

    • How?
      setTimeout (()=>console.log ('sic'), 0)
    – The39 Sep 25 '17 at 08:48