How Javascript Works? - Call Stack, Event Loop and Queues Explained

Поделиться
HTML-код
  • Опубликовано: 23 дек 2024

Комментарии • 70

  • @yashkamdar4912
    @yashkamdar4912 Месяц назад +10

    Look like piyush comes to surpass every youtuber. Honestly bro your best now

  • @rajkir2852
    @rajkir2852 Месяц назад +24

    Also video on how node handles 1000s of request at a time we need

  • @shubhtalk7073
    @shubhtalk7073 Месяц назад +13

    No one can beat you when its comes to explanation ❤

  • @RakeshKumar-vo3ih
    @RakeshKumar-vo3ih Месяц назад +1

    tusi chha gye sir, pahli bar samaj me aaya ye lafda, javascript ka...

  • @naumanshigri
    @naumanshigri День назад

    ap ka video bht he acha lga. and thank you so much event loop ab smj lg gy .. after 6 year

  • @-CSE-BurhaanWani
    @-CSE-BurhaanWani Месяц назад +7

    Great content❤.
    I would to see videos on OOPS in javascript and a small project using OOPS

  • @kunju17
    @kunju17 Месяц назад +1

    It was incredibly clear and informative! You did an amazing job breaking down complex concepts in a way that's easy to understand, especially the way the call stack and event loop work together. Thank you for such a well-structured explanation-it really helped me deepen my understanding of JavaScript!

  • @satyamvanshal
    @satyamvanshal 2 дня назад

    Lots of love and blessings for such an incredible tutorial. You are a great teacher. Thank you so much for making my coding journey easier. May God bless your channel with a billion subscribers. I am one of them. ❤❤❤

  • @ramireddypanditi6823
    @ramireddypanditi6823 Месяц назад

    you are truely amazing the way of explaining the how javascript works behind the scene. Even a begginer can understand clean detailed way

  • @dhyeyparekh4994
    @dhyeyparekh4994 Месяц назад

    Best content I have ever seen on RUclips. Learned many many more things. Thank You and please continue making this type of videos

  • @SolarisGamingYT_
    @SolarisGamingYT_ Месяц назад

    Best explanation of the event loop brother. You literally killed it

  • @yogeshkashyap7617
    @yogeshkashyap7617 11 дней назад

    bro u are a one of the best teachers

  • @TusharSamanta-t9m
    @TusharSamanta-t9m 26 дней назад

    You have a great power to make understand others, Thank you so much!!!!

  • @shubhamdas6519
    @shubhamdas6519 Месяц назад

    Thanks for the knowledge sir.

  • @atharvsankpal
    @atharvsankpal Месяц назад

    Understood Everything, Nice Explanation, Looking forward for next videos!!!

  • @Danish-saifi1
    @Danish-saifi1 Месяц назад

    the way he explains can't be explained in words❤

  • @shubhtalk7073
    @shubhtalk7073 Месяц назад

    Ossam explanation piyush bhaiya 😊😊

  • @TusharSamanta-t9m
    @TusharSamanta-t9m 26 дней назад

    Fine! how nice to understand,Thank you so much!!!

  • @bidsouravbest
    @bidsouravbest Месяц назад

    YOU RE A LEGEND.

  • @mdashifreza1296
    @mdashifreza1296 Месяц назад

    Hii
    You are great explainer of tech now evolving around developers.

  • @DeepeshDev001
    @DeepeshDev001 Месяц назад

    Helping me to get Advance in JS
    Thank you bahi

  • @ujjwalssharma8149
    @ujjwalssharma8149 24 дня назад

    Nicely explained 🔥

  • @zahidulhaquejony
    @zahidulhaquejony Месяц назад

    I am from Bangladesh. You're really amazing.

  • @abhrajitsaha7
    @abhrajitsaha7 20 дней назад

    Thank you so much sir!

  • @mayankjoshi2077
    @mayankjoshi2077 Месяц назад

    Thank you for this wonderful videos

  • @shubhtalk7073
    @shubhtalk7073 Месяц назад

    Exited for next video ❤

  • @sciencequotesfacts5543
    @sciencequotesfacts5543 Месяц назад +2

    Sir Please tell me , whether the callback functions run inside the global execution context or its i executed after all the synchronous code is excuted and global execution is poped out from the stack .
    if cb fn not executed inside GEC then how they access the values from the scripts.

  • @vishalkumarchoudhary8497
    @vishalkumarchoudhary8497 Месяц назад

    Best explanation

  • @HafizMAnam
    @HafizMAnam Месяц назад +1

    A Wonder Full Content Bro
    Bro Need Series on React

  • @AjitKumar-jr7jo
    @AjitKumar-jr7jo Месяц назад

    thank you piyush.

  • @paltan_team
    @paltan_team Месяц назад +1

    Bhaiya Mera next month interview hai ap please playlist complete kr denge kya?
    apka smjhaya hua mind se niklta hi nahi
    You are my bestest teacher/bro/friend

  • @pratikanand143
    @pratikanand143 Месяц назад

    Very nice video ❤
    Please make some video on typescript also.

  • @codingwithankit7619
    @codingwithankit7619 12 дней назад

    very well explained.

  • @sachinkhatri1077
    @sachinkhatri1077 Месяц назад

    Can someone clarify my doubt? At 7:41, he said that after executing all the code, everything will be removed from the call stack, including the global execution context. My question is: when the event loop pushes the setTimeout function to the call stack, does it create a new global execution context or a local execution context? Or does the global execution context remain in memory until the entire JavaScript code has completed execution?

    • @shahwaizkarim-h9z
      @shahwaizkarim-h9z Месяц назад +1

      It does not pushes the setTimeout function entirely into call stack It pushes the callback function(not setTimeout bro) provided to setTimeout to Macro-task queue and then pushes to call stack. Also global execution context doesn't remains in the call stack, it 's kicked out before pushing the callback but the variables are still stored in the memory!

    • @sachinkhatri1077
      @sachinkhatri1077 Месяц назад +1

      @shahwaizkarim-h9z thats my mistake i know that only function pushes in the stack but question is still same how without global execution context the function run on stack ? I think to run any code there should be an execution context.

    • @i7iiy
      @i7iiy Месяц назад

      I guess he talks about execution of code not hoisting for hoisting there might be another mechanism

  • @RaoAnkitYadav-cv5sg
    @RaoAnkitYadav-cv5sg Месяц назад

    An amazing explanation can you make this type of series for Mern stack also everyone is waiting for that

  • @sunilgope1848
    @sunilgope1848 Месяц назад

    Thank you sir ❤

  • @ShakilAhmad-w7s
    @ShakilAhmad-w7s 5 дней назад

    Most of the thing is clear now. A question: since we pass callback functions inside the setTimeout and Promise. So when these function goes from web Api to task queue and microtask queue respectively then to call stack. how or who calls these callback functions?

  • @sauravsahaa
    @sauravsahaa 16 дней назад

    Thanks

  • @shubhtalk7073
    @shubhtalk7073 Месяц назад

    You are best

  • @tanushreegharami227
    @tanushreegharami227 Месяц назад

    Thank you sir

  • @viveksilori420
    @viveksilori420 27 дней назад

    just woow
    great

  • @Biplab_Mahanty
    @Biplab_Mahanty 16 дней назад

    yes it's awesome

  • @i7iiy
    @i7iiy Месяц назад

    Please make this type of video on nodeJs

  • @RajanYadav-fz6iw
    @RajanYadav-fz6iw Месяц назад

    fetch metho also comes into micro task queue

  • @shabarinathk8954
    @shabarinathk8954 Месяц назад

    Flashbang warning at 1:38

  • @devisinghlodhi9757
    @devisinghlodhi9757 Месяц назад

    🔥🔥🔥

  • @japtavyasingh7334
    @japtavyasingh7334 Месяц назад

    great

  • @dharmrajhembram6445
    @dharmrajhembram6445 Месяц назад

    Make a playlist on javascript and node js interview

  • @moviesasylum8531
    @moviesasylum8531 Месяц назад

    Bro i have completed your js playlist,
    but completing and checking more things, i found that some topics are missing like object

  • @its_Amit_00
    @its_Amit_00 Месяц назад

    I recently started backend in javascript, please help me how can i practice it more

  • @akshaychavan5511
    @akshaychavan5511 18 дней назад

    Gem!

  • @mullayam
    @mullayam Месяц назад

    add one more example executing setTimeout and setImmediate then what will happened, webapi and event loop

  • @Surenderkohli77
    @Surenderkohli77 25 дней назад

    Hi, Please makes a series for js logic development skill from 0 to advance

  • @sabbirhossan3499
    @sabbirhossan3499 Месяц назад

    1:39 light mode activated ⚠️
    Stay safe.

  • @AzharAli-n5c
    @AzharAli-n5c Месяц назад

    please continue the rust series

  • @vaishnavshegale822
    @vaishnavshegale822 Месяц назад

    💛

  • @crush_ka_bhai
    @crush_ka_bhai Месяц назад

    🏅 प्रथम

  • @azharalibhutto1209
    @azharalibhutto1209 Месяц назад

    Please please please continue rust series'

  • @adityakiran5236
    @adityakiran5236 Месяц назад

  • @shri_x1
    @shri_x1 Месяц назад

    your explaination are super good, i would be nice if u do all videos in english

  • @pixelgoat_
    @pixelgoat_ Месяц назад

    English subtitles???

  • @akshay7018
    @akshay7018 Месяц назад

    Light Mode🫣

  • @RishabhRawat-v6t
    @RishabhRawat-v6t Месяц назад

    good going , I am a boy still I feel U are cute 😆

  • @henyadose
    @henyadose Месяц назад

    Promises are not part of WebApis

  • @khalidbinshakeel6901
    @khalidbinshakeel6901 Месяц назад

    is promise part of webapi like settimeout in JS?
    2/2
    ChatGPT said:
    ChatGPT
    No, Promises in JavaScript are not part of the Web API. They are part of the JavaScript language itself, specifically introduced in ES6 (ECMAScript 2015).
    Please explain @piyushgargdev

  • @MusaShaik1994
    @MusaShaik1994 Месяц назад

    Script:
    console.log("Hello World");
    setTimeout(() => {
    console.log("Hello World after 0 seconds");
    }, 0);

    setTimeout(() => {
    console.log("Hello World after 2 seconds");
    }, 2000);

    setTimeout(() => {
    console.log("Hello World after 0 seconds 3th time");
    }, 0);



    console.log("bye bye");
    Answer:
    Hello World
    script.js:17 bye bye
    script.js:4 Hello World after 0 seconds
    script.js:12 Hello World after 0 seconds 3th time
    script.js:8 Hello World after 2 seconds

  • @nobody124...
    @nobody124... Месяц назад

    you always bark in hindi