Javascript Event Loop and Queues - Vanakkam Javascript - JS Tutorial | Tamil | 2025 | Part 3
Hareesh Rajendran
View ChannelAbout
Coding tips and tricks :) Goal : Collab with A2D A Software Developer from Zoho discuss about Tech, Artificial Intelligence, Fullstack Development. Sharing the experiences of a self-taught Coding journey. Software Architectures and How to Crack FAANG level Companies. Everything about software development and computer science engineering and Tech in general. A bit of financial knowledge here and there. Everything shared here are my personal Experience / Research & Opinions
Video Description
Javascript Event Loop and Queues - Vanakkam Javascript - JS Tutorial | Tamil | 2025 | Part 3 This video is made in collaboration with JS Lovers Community. Everything covered in this video is explained in detail in the following link : https://dev.to/jslovers/mastering-async-js-demystifying-the-event-loop-microtasks-macrotasks-1ha Chapters: 00:00 Intro 00:50 Single-Threaded Language 01:20 Call Stack 02:28 Web APIs 07:23 JS execution Flow 07:55 Example 1 (Basic) 11:50 Example 2 19:12 Example 3 (Advanced) 27:09 Task Starvation 28:38 Key Takeaways 29:50 Conclusion Learn how the browser event loop, task queue, microtask queue, and Web APIs work together to enable non-blocking, asynchronous JavaScript. JavaScript is a synchronous, single-threaded language, but async operations like setTimeout, fetch, and event listeners rely on the event loop, microtasks, and macrotasks for execution. πΉ Key Concepts: β JavaScript executes synchronous code first. β Asynchronous tasks use Web APIs and the event loop. β Microtasks (Promises, MutationObserver) execute before Macrotasks (setTimeout, event listeners). β Fetch responses (microtasks) execute before setTimeout callbacks (macrotasks). β Task starvation can occur if microtasks keep running without allowing macrotasks. By mastering these, you can write efficient & bug-free async JavaScript! π Whatsapp Channel: https://whatsapp.com/channel/0029VaYIn3NJUM2WPkmJ9I43 Join Membership: https://www.youtube.com/channel/UCVXHYmFar7yArWvkcjxWXuQ/join π’π’π’π’ Social Media Links π’π’π’π’ Mentorship 1:1 : https://www.meetmymentor.me/hareesh_rajendran Buy me a coffee βοΈ : https://www.buymeacoffee.com/hareeshrajendran LinkedIn: https://www.linkedin.com/in/hareesh-r/ Instagram: https://www.instagram.com/hareesh_._r/ Facebook: https://www.facebook.com/hareeshprogrammer/ Twitter: https://twitter.com/hareesh_dev GitHub: https://github.com/hareesh-r Curious to know more about me?: https://hareesh.web.appπ Your support means the world to me! π Let's build an awesome community together. πβ¨
Upgrade Your Everyday
AI-recommended products based on this video

Amazon Echo Show 8 (newest model), With Spatial Audio, Smart Home Hub, and Alexa, Charcoal

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, with Active Noise Cancellation, Adaptive Audio, Transparency Mode, Personalized Spatial Audio, USB-C Charging Case, Wireless Charging, H2 Chip

Wireless Earbuds, Bluetooth 5.4 Headphones, True Wireless Stereo Earphones with IPX7 Waterproof, Noise Cancelling Mic, Fast Charging and Comfort Fit Ear Buds for Sports/Workouts - Black

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, Personalized Spatial Audio, Sweat and Water Resistant, USB-C Charging Case, H2 Chip, Up to 30 Hours of Battery Life, Effortless Setup for iPhone

Apple AirPods Pro 2 Wireless Earbuds, Active Noise Cancellation, Hearing Aid Feature, Bluetooth Headphones, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Smart Watch for Men/Women, 1.95" AMOLED Fitness Tracker Watches with Bluetooth Calls/Flashlight/100+ Sport Modes Heart Rate/Sleep Monitor Ultra Lightweight Ultrathin Design

Smart Watch for Men Women (Answer/Make Call), 1.96" HD Smartwatch Fitness Activity Tracker, 110+ Sports IP68 Waterproof, Heart Rate/Sleep Monitor/Pedometer/Calories, Fitness Watch for Android iOS
![Apple Watch Series 10 [GPS 46mm case] Smartwatch with Rose Gold Aluminium Case with Light Blush Sport Band - M/L. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant](https://m.media-amazon.com/images/I/61nNNMI1cFL._AC_UL960_FMwebp_QL65_.jpg)
Apple Watch Series 10 [GPS 46mm case] Smartwatch with Rose Gold Aluminium Case with Light Blush Sport Band - M/L. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant
![Apple Watch Series 10 [GPS 42mm case] Smartwatch with Jet Black Aluminium Case with Black Sport Band - S/M. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant](https://m.media-amazon.com/images/I/6105jZyXyPL._AC_UL960_FMwebp_QL65_.jpg)
Apple Watch Series 10 [GPS 42mm case] Smartwatch with Jet Black Aluminium Case with Black Sport Band - S/M. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant

NOCO Boost GB40: 1000A UltraSafe Jump Starter β 12V Lithium Battery Booster Pack, Portable Jump Box, Power Bank & Jumper Cables - for 6.0L Gas and 3.0L Diesel Engines

UGREEN Nexode Power Bank 20000mAh 130W Portable Charger 72Wh PD Fast Charging 3-Port USB C Battery Pack with TFT Smart Display for MacBook/iPad/iPhone 16/Samsung S24 and More

ANKER 737 Power Bank, 24,000mAh 3-Port Laptop Portable Charger with 140W Fast Charging, Smart Display, for Outdoor Work, Compatible with iPhone 16/15/14 Series, Vision Pro, Samsung, MacBook, and More

VOLTME Portable Charger, Slim 10000mAh 5V/3A Power Bank, USB C in&Out High-Speed Charging Battery Pack, Travel Essentials Dual Output Compatible with iPhone 16 15 14 13 12 Samsung Google iPad etc

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, with Active Noise Cancellation, Adaptive Audio, Transparency Mode, Personalized Spatial Audio, USB-C Charging Case, Wireless Charging, H2 Chip

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, Personalized Spatial Audio, Sweat and Water Resistant, USB-C Charging Case, H2 Chip, Up to 30 Hours of Battery Life, Effortless Setup for iPhone

Apple AirPods Pro 2 Wireless Earbuds, Active Noise Cancellation, Hearing Aid Feature, Bluetooth Headphones, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Bose QuietComfort Bluetooth Headphones, Wireless Headphones with Active Over Ear Noise Cancelling and Mic, Deep Bass, Up to 24 Hours of Playtime, White Smoke

Barnyard Designs Indoor Herb Garden Planter Set with Tray, Metal Windowsill Plant Pots with Drainage for Outdoor or Indoor Plants, Set/3 (Black)

Eye Contact Web Camera for Desktop Computer β 1080P USB Camera with Microphone & Stand, Center Cam for Laptop or Desktop, Manual Focus, Plug & Play for macOS & WindowsοΌBlackοΌ
![PEHAEL 3+3Pack for iPhone 17 Pro Max Privacy Screen Protector with Camera Lens Protector Full Coverage Anti-Spy Tempered Glass Film 9H Hardness Easy Installation Bubble Free [6.9 inch]](https://m.media-amazon.com/images/I/61PnVkv6KKL._AC_UL960_FMwebp_QL65_.jpg)
PEHAEL 3+3Pack for iPhone 17 Pro Max Privacy Screen Protector with Camera Lens Protector Full Coverage Anti-Spy Tempered Glass Film 9H Hardness Easy Installation Bubble Free [6.9 inch]
![Ailun 3 Pack Screen Protector for iPhone 16 Pro Max [6.9 inch] + 3 Pack Camera Lens Protector with Installation Frame,Sensor Protection,Dynamic Island Compatible,Case Friendly Tempered Glass Film](https://m.media-amazon.com/images/I/815keamN-BL._AC_UL960_FMwebp_QL65_.jpg)
Ailun 3 Pack Screen Protector for iPhone 16 Pro Max [6.9 inch] + 3 Pack Camera Lens Protector with Installation Frame,Sensor Protection,Dynamic Island Compatible,Case Friendly Tempered Glass Film



