DEV Community

Discussion on: Synchronous and Asynchronous JavaScript for Beginners

Collapse
 
rattlingshinuiba profile image
Rattlingshinuiba

A great article to read and discuss! I have read through it but there is a part I don't quite understand:

if our stack is empty (meaning nothing is to be done, no execution context has been created) and our task queue is not empty, the first thing is pushed out of the stack.

Am I right to assume the bold word "stack" is supposed to be replaced with "queue"?

Many thanks!

Collapse
 
lukaszzarski profile image
Łukasz Żarski

Yes, You are totally right, sorry for a mistype. It's also worth noting that, the first thing 'completed' is pushed out of the task queue.

Collapse
 
rattlingshinuiba profile image
Rattlingshinuiba

Thanks!