0

I am new to Javascript and Asynchronous programing.

I have learnt that

  1. Callbacks of an asynchronous function are put in a message queue and executed via event loop
  2. Asynchronous execution is non-blocking, done via event loop.
  3. Functions like setTimeout are asynchronous.
  4. Asyncrhonous functions are blocking, only their callbacks are non-blocking

How to identify an Asynchronous function in Javascript ? and do "Asynchronous execution, non-blocking execution, execution context put in message queue" mean the same in Javascript ?

Please do point out if my learnings include misfacts

Note : I know about a similar question What makes a JavaScript function asynchronous?, but the answers explain the mechanism and not "How to identify an Asynchronous function ?"

Ajay Sabarish
  • 61
  • 1
  • 7
  • 1. No. 2. No. 3. Yes. 4. No. – VLAZ Jan 21 '21 at 16:33
  • "*do "Asynchronous execution, non-blocking execution, execution context put in message queue" mean the same in Javascript*" - there is an overlap but I would say "no" because they describe different aspects of execution, they aren't synonymous of *one* thing. Although, an asynchronous function often possesses all these qualities. – VLAZ Jan 21 '21 at 16:36
  • @VLAZ > 1. No. 2. No. 3. Yes. 4. No Can you please elaborate ? I am new to Javascript and it is not so obvious, such conceptual misunderstandings are hampering my progress. – Ajay Sabarish Jan 21 '21 at 17:08

0 Answers0