Event loop

Presentation is prepared by Marat Sovan

https://github.com/sovanmarat
  • what is Event loop
  • why do we need to know how the Event loop works
JAVASCRIPT ENGINE OVERVIEW

						function multiply(x, y) {
						  return x * y;
						}
			
						function printSquare(x) {
						  let s = multiply(x, x);
						  console.log(s);
						}
			
						printSquare(3);
					  

Environment

						console.log('1');
						setTimeout(function a() {
						console.log('2')},0);
						console.log('3');
					  

Microtask and Macrotask

Used sources:

learn.javascript.ru/event-loop habr.com/ru/post/461401/ latentflip.com/loupe/ youtube.com/watch?v=8aGhZQkoFbQ youtube.com/watch?v=j4_9BZezSUA

Thanks for attention