TRUST ISSUES with setTimeout() | Namaste JavaScript Ep.17

This BONUS video covers the fundamentals of setTimeout, how it works behind the scenes. We also discover that setTimeout does not guarantee that the callback method will be executed exactly after a certain delay. Hence, there are trust issues with setTimeout. 😅
Moreover, we will also cover the case of setTimeout with 0 delay. It's a very famous Interview question and confuses a lot of new developers.
Towards the end, I also show the demo of how you can set up exactly the same playground to write code, just like I do in these videos. Check that out and I highly recommend you to set up a similar playground and experiment a lot with code while watching Namaste JavaScript 🙏
The only request is to watch this Episode of Namaste JavaScript with full attention.
My tech gear I use every day - google.peek.link/2pba
00:00 - Introduction
00:38 - Why we have trust issues with setTimeout?
06:52 - Code demonstration of the setTimeout delay
15:35 - Discussion about setTimeout(0)
20:27 - Set up practice playground on the local system
25:02 - Teaser of the Next Video
25:36 - Thank you for watching Namaste JavaScript 🙏
Support this video series, NOT BY MONEY, but by sharing it with your friends. 🙏
I'll give my best to come up with great content and everything absolutely for free on KZread. 😊
If you are active on Social Media,
please give a shoutout to Namaste JavaScript and help me reach more people. 🙏
Cheers,
Akshay Saini
akshaysaini.in
Would love to Stay Connected with you ❤️
LinkedIn - / akshaymarch7
Instagram - / akshaymarch7
Twitter - / akshaymarch7
Facebook - / akshaymarch7
#NamasteJS #AkshaySaini

Пікірлер: 751

  • @akshaymarch7
    @akshaymarch73 жыл бұрын

    Next Episode: "Higher Order Functions & Introduction to Functional Programming" - kzread.info/dash/bejne/ep-L2th7YbWwoZM.html BTW, How was this video? Let me know in the comments below, I read each and every comment! ❤️

  • @RohitKumar-vd6mi

    @RohitKumar-vd6mi

    3 жыл бұрын

    Thanks for this!

  • @priyanshuagarwal2337

    @priyanshuagarwal2337

    3 жыл бұрын

    Dude add videos on topics left such as Arrow functions, promises, exports, and also how things work at memory level/execution context in case of multiple files using exports etc. Also It will be great if you can create a web dev course, explaining Angular/React/NodeJS. Thanks man!

  • @olahuuber5540

    @olahuuber5540

    2 жыл бұрын

    The way you bow down and say namastey it shows you are uttrakhandi 😂

  • @lingrajbiradar4416

    @lingrajbiradar4416

    2 жыл бұрын

    please add promises videos

  • @robinsoni4778

    @robinsoni4778

    Жыл бұрын

    I have one doubt, let's say when global context in the call stack is being resolved which eventually going to take let's say 10 seconds to execute and in the same time there was a fetch call been made, which has the call back function attached to it, and the code in that call back itself going to take 5 seconds, will that callback be resolved only in the call stack (total 10 + 5 seconds to execute code) or it would've already be executed before the time the fetch call back pushed into the call stack, in that case it will take max(10,5) = 10 seconds? Please help with above Akshay.

  • @saurabhchauhan232
    @saurabhchauhan2323 жыл бұрын

    Please do not let this series die here, hoping you are good and healthy.

  • @DesignStrong

    @DesignStrong

    3 жыл бұрын

    Look at videos on our side in meanwhile

  • @tautikagrahari489

    @tautikagrahari489

    2 жыл бұрын

    @@DesignStrong yep ..this series dead

  • @riyazahmedpathan3850

    @riyazahmedpathan3850

    6 ай бұрын

    started new series @@tautikagrahari489

  • @jagrutsharma9150
    @jagrutsharma9150 Жыл бұрын

    Things learned: 1. The setTimeout function stores it in the callback queue which is executed only after call stack is empty, even if setTimeout is set to 0ms. 2. setTimeout ensures that minimum it will take the time mentioned because it may be paused due to call stack not empty.

  • @haroonhayat4797
    @haroonhayat47973 жыл бұрын

    Akshay Please make video on Promises 🙏

  • @sanjeevguglani6623

    @sanjeevguglani6623

    3 жыл бұрын

    Let's highlight this comment untill it reaches to akshay

  • @haroonhayat4797

    @haroonhayat4797

    3 жыл бұрын

    @@sanjeevguglani6623 👍👍😍

  • @snehaagarwal1777

    @snehaagarwal1777

    3 жыл бұрын

    Even I request this🙏🙏🙏

  • @akshaymarch7

    @akshaymarch7

    3 жыл бұрын

    Sure 🙏❤️

  • @hiteshbariya384

    @hiteshbariya384

    3 жыл бұрын

    Also on async and await :)

  • @shreeharinw
    @shreeharinw3 жыл бұрын

    Before I started watching this series, I was one of those guys who hates JavaScript and here me loving this language by the end of your course. Wish you all the success in your life from the bottom of my heart.

  • @yashbansal1038

    @yashbansal1038

    3 жыл бұрын

    Bruh iss not the end

  • @valp_co

    @valp_co

    2 жыл бұрын

    I love this comment since I think same

  • @revanthrev23
    @revanthrev233 жыл бұрын

    Hi Akshay! This entire playlist is one of the best things I have ever come across in my life. Such in depth explanation with such clarity is just unreal bhai! Absolutely loved to learn from you. Please take out time from your busy schedule and continue to make videos either for this playlist or maybe make a new playlist for any of the JS frameworks. Learning React from you would make the lives of millions of people. So please give it some thought and make newer videos as and when possible. Thank you for this lovely playlist so far! ❤️

  • @tan7246
    @tan72463 жыл бұрын

    Extremely amazing series. Thank you so much for doing this. Hands down, the best series. Please make more videos. Would love to learn more from you!

  • @godoftheLTD
    @godoftheLTD2 жыл бұрын

    I'm so glad I found a video that explains this concept so well because many of my coworkers get confused about this. Thank you so much for putting this series together! I would love a similar series on how JS bundlers work!

  • @SACHINRAJPUT-rj3oq
    @SACHINRAJPUT-rj3oq3 жыл бұрын

    This namaste-javascript course made me fall in love with JavaScript programming language...... Completed all the videos till now, and eagerly waiting for the next video... Thankyou 🙏

  • @tzdtuc-pd9yv
    @tzdtuc-pd9yv2 жыл бұрын

    This passionate guy is a god-sent angel. He manifests not only the beauty of javascript but also his beautiful soul ❣

  • @syedquadri3922
    @syedquadri39223 жыл бұрын

    Legendary Akshay Bhai. Legendary... All Javascript developers - Experienced or newbies should look at these videos. Clear, crisp to the point - NO nonsense videos. Also, when are the next videos coming out???

  • @ramyanh5302
    @ramyanh53022 жыл бұрын

    @Akshay Saini You have the power of changing the mind of watching netflix series on sunday's to watch your beautiful, conentful Namaste javascript series. You are changing lives and you will stay blessed. Kudos

  • @vineetpardhi5475
    @vineetpardhi54753 жыл бұрын

    bro, this knowledge which you have is pure gold for developers, I won't even get this even if I paid for JS courses. thankyou so much.

  • @ritikabhatt2370
    @ritikabhatt23703 жыл бұрын

    Please complete this series Akshay sir. You are a gem 💎 it's a humble request , we have fallen in love with javascript and now wanted more deeper videos.

  • @naziaakhtar6781
    @naziaakhtar6781 Жыл бұрын

    Your teaching style is very simple and easy to understand. Love your videos. Thank you so much .

  • @letscodetogether9289
    @letscodetogether92892 жыл бұрын

    Just Fall in Love with Java Script .The way you explained was amazing. Even love your dedication to help us by this type of knowledge heavy content

  • @AbhishekKumar-id2nt
    @AbhishekKumar-id2nt3 жыл бұрын

    Wow, learnt too much in single video itself. Thank you.

  • @nikhildr4441
    @nikhildr44413 жыл бұрын

    Hi Akshay, just finished this video the Quality of content and knowlegde you are sharing is priceless. at one point you said that time is Jan 16th and 10.37 in the night, It shows how dedicated you are to bring out these videos. Thanks for these Videos, we need more people like you to share their knowledge and experiences open to the world. It'll help a lot for many people like me who are just starting out in this field. Ps: I'm the kind of person who doesn't comment on youtube videos, when you are taking hours of your Quality time making content, taking time to comment out my views is nothing. [Waiting for upcoming videos]

  • @akshaymarch7

    @akshaymarch7

    3 жыл бұрын

    ❤️

  • @manishankar1779
    @manishankar17793 жыл бұрын

    Love your energy and enthusiasm while teaching . Keep it up

  • @th3ja
    @th3ja4 ай бұрын

    Namaste Javascript has been one of the best resources in my coding journey! Thanks for everything Akshay!

  • @goswamikanika8
    @goswamikanika82 жыл бұрын

    You are teaching JS so well . I have started to fall in love with JS.

  • @zehrxsyed
    @zehrxsyed3 жыл бұрын

    Completed the series in 2 days. Totally in love with the way you teach.. eagerly waiting for the forthcoming ones...much thanks to you sir.

  • @globalclutter9508

    @globalclutter9508

    3 жыл бұрын

    2 days are enough to get familiar with js? Please tell me as I'm learning Java, I don't want to get mixed up

  • @sushantgarudkar211

    @sushantgarudkar211

    Жыл бұрын

    @@globalclutter9508 Seriously not! 2 days for a person who knows already how to code in js and have little experience working with it just a begineer level is enough. For freshies this is not the thing! just you have to understand basic concepts do some coding basic scripting and you can follow with it

  • @kazikkluz2881
    @kazikkluz28813 жыл бұрын

    Man, you're a hero. Thanks for the great videos and keep up the good work

  • @sougata2705
    @sougata27053 жыл бұрын

    I dont usually subscibe or like yt videos...But this whole playlist was so awsome and well-explained..my hand just clicked the subscibe button..

  • @priyankaahire1000
    @priyankaahire10003 жыл бұрын

    Thanks. This 10-sec code execution question came in my mind at the time of episode 13. Now I am clear with my doubt.

  • @sanketwarambhe7879
    @sanketwarambhe78793 жыл бұрын

    I rarely comment on any videos but I have to say, this is one of the best js courses out there. Eagerly waiting for the next videos :)

  • @ludovicmanga8241
    @ludovicmanga8241 Жыл бұрын

    Brother your videos are so helpful ! I am about to buy your react formation just to support you for the amazing content. Lot of love from France 🥰

  • @sheetalpatil9462
    @sheetalpatil94623 жыл бұрын

    Seriously I am also falling in love with javascript ..by watching your videos ...Thank you for making such great videos. Waiting for promise ..

  • @nadipiswetha
    @nadipiswethaАй бұрын

    Absolutely beautiful series. The time that we set in the setTime out is the "MIN" wait time. ❤

  • @PrashantAmoli
    @PrashantAmoli3 жыл бұрын

    25 seconds into the video and it has been educational💯 and entertaining🔥 at the same time Now this is one of the many reasons I recommend Akshay Sir's🙏 videos to every 🔰JS developer🔥

  • @aamirjamal6833
    @aamirjamal68333 жыл бұрын

    Awesome! Thanks for the knowledge. And thanks for keeping only one advertisement that too in the end. 🙏

  • @prasoon2510
    @prasoon25103 жыл бұрын

    Ohh is it... i think most of the dev can’t answer like this.. thank you Akshay.. millions clapping for you..! 🙏😊

  • @arunvishwakarma2779
    @arunvishwakarma27793 жыл бұрын

    I have taken notes of all the things you have taught so far and that is a "Grantha" for me. Every time I go through these notes, I see your face as if you are explaining it again. Like in the old bollywood movies, when a person would read a letter, the person's face would appear on the letter :D

  • @susmitobhattacharyya1668
    @susmitobhattacharyya16683 жыл бұрын

    Love you JavaScript and thanks again Akshay for making me fall in love with Javascript.

  • @anchalgupta996
    @anchalgupta9963 жыл бұрын

    Eagerly waiting for next video. I am in love with these Javascript tutorial. Please upload next video soon. No one can explained these things better than you.

  • @manikumar1662
    @manikumar16623 жыл бұрын

    Getting clear picture of concepts after watching your vedios..Thanks a lot

  • @shreyanshrathi409
    @shreyanshrathi4094 ай бұрын

    Loving the way you explained each and every thing. You are light i am looking. SUPERHERO 🤩🤩🤩🤩

  • @tusharkulange4029
    @tusharkulange4029 Жыл бұрын

    Yes I fall in love with JavaScript 🥰🥰

  • @AshishKumar-bf4cc
    @AshishKumar-bf4cc3 жыл бұрын

    Crystal clear sir i love the way you are teaching thank you so much sir.

  • @luckshaeey
    @luckshaeey2 жыл бұрын

    The video was beautiful sir ❤ have understood a lot of java script concepts. Will try applying them in my projects too. Thank you

  • @dhruvilkumar3577
    @dhruvilkumar3577 Жыл бұрын

    You are right we fall in love with javascript you are explaining osam

  • @meghakg6283
    @meghakg62833 жыл бұрын

    Hi, Akshay! Hope you're well. Every video of yours is sooo informative and I thoroughly enjoyed each of them, it seems like a friend is explaining me something and that makes learning so much fun. Thanks a lot, Sir. 🙏I really hope you continue making more videos.

  • @sivaganeshakula3492
    @sivaganeshakula34923 жыл бұрын

    Hi Akshay, I love you explanation and deep dive to the topics. I would like to know better on this topics 1) Can you please make a video on performance related, security related, memory leak, when to use let, const and var at their best etc.., 2) On state management 3) Arrays and Objects (Deep and shallow copy) Thanks for sharing knowledge especially on behind the scenes of our code Please like and comment till it reaches Akshay if you are interested to know this topics

  • @jaishrikrishna5755

    @jaishrikrishna5755

    2 жыл бұрын

    it will be great to learn all these from akshay

  • @WaqasKhanDurrani
    @WaqasKhanDurrani Жыл бұрын

    Mind Blowing Concepts!

  • @sarveshshirude9225
    @sarveshshirude9225 Жыл бұрын

    Thank you Akshay Sir for the bonus video.

  • @nikitakumawat6365
    @nikitakumawat63652 жыл бұрын

    Now, the things are crystal clear.

  • @codewithabhishek1676
    @codewithabhishek16762 жыл бұрын

    Awesome video , how much you have creativity think about each logic

  • @adityasharma3927
    @adityasharma39273 жыл бұрын

    Totally loved this series, waiting for the next video.....

  • @abhishekvishwakarma9045
    @abhishekvishwakarma90453 жыл бұрын

    19:12 A clear example I noticed when we used defer in our tag during including in our html (Inside head tag) -> Sometimes we want that -> 🤔okkk this script should be called after the file (or page) parsed completely -> then defer attribute is helpful. great deep dive explanation🔥🔥 (Watched very late 😁😅) And also thanks for the NamasteDev🤩👌

  • @divyadiya6229
    @divyadiya6229Күн бұрын

    Akshay thanks alot it's because of you I started loving JavaScript.😇

  • @aayushthakur6159
    @aayushthakur61593 жыл бұрын

    sir will this series continue? Many important topics are left like promises, I'm in love with your way of teaching, belive me today i had my oncampus interview in which all those questions which were asked from javascript was covered by you. Sir it's my humble request to please don't drop this series because it may help many people like us to get a good job only because of you . people like you are rare Thank you so much in advance akshay sir❤

  • @sameersahu4569
    @sameersahu4569 Жыл бұрын

    Beautifully Explained as always Thank you!!Understood!!

  • @aryangrover7216
    @aryangrover72163 жыл бұрын

    Please make more videos, We all are just loving your series, Please make a lot of videos on advance concepts.

  • @jp-rb1oi
    @jp-rb1oi11 ай бұрын

    I have loved C++ for a long time because of DSA but now also love Js....❤️

  • @mind2digital116
    @mind2digital116 Жыл бұрын

    Akshay you are elevating humanity consciousness with these videos, thank you 💪💪

  • @Rachana453
    @Rachana4532 жыл бұрын

    With your Video I really love javascript now. Please make more videos on useful concepts.

  • @madhavendrapratapsingh7272
    @madhavendrapratapsingh72723 жыл бұрын

    Jai Hind Sir, You are simply AWESOME. Now my main language is JavaScript. I just want to work on it throughout my life. Thank you so much, sir, I have a request just to put that series in an infinite loop so that videos of this series never end..so please sir just keep adding videos on this series. This is a very humble request. Thank You!

  • @rajwardhanshinde7009

    @rajwardhanshinde7009

    8 ай бұрын

    hello bro i have some doubts regarding js plz how can i contact you plz help 🙏🏻🙏🏻🙏🏻 i am in need

  • @RavindraSingh-zg9eq
    @RavindraSingh-zg9eq2 ай бұрын

    Amazing nice crystal clear explanation

  • @dieshimitigert6758
    @dieshimitigert6758 Жыл бұрын

    Thanks for the great explanation!!!!!

  • @SiddharthSingh-yf1jl
    @SiddharthSingh-yf1jl3 жыл бұрын

    Sir please make a dedicated video on objects. I confused alot in objects. And you are such a god of js , I just love to watch your series. THANK YOU❤️😊

  • @harshprajapati3230
    @harshprajapati32303 ай бұрын

    Broooo, love this namaste javascript series

  • @rumpamala7670
    @rumpamala7670 Жыл бұрын

    loved your way of teaching . Thank you for your efforts :)

  • @rashichawla448
    @rashichawla4483 жыл бұрын

    Can you please make a video on what happens behind the scenes in promises? I absolutely love your work and the way you teach, concepts get etched in memory very beautifully. Struggling a lot learning promises, please please make a video soon

  • @gokuljayaraman9080
    @gokuljayaraman90802 жыл бұрын

    In mobile environment we will be using this in splash/welcome screen. Its really important to know about this clearly. Today I got clear understanding, thank you Akshay !!😀😍

  • @ridhimandhariwal1418
    @ridhimandhariwal1418 Жыл бұрын

    Thank You, Akshay for making this course so interesting

  • @SlayerisHere
    @SlayerisHere11 ай бұрын

    thank you for exceptional explaination

  • @nikithamalkapuram8728
    @nikithamalkapuram87282 жыл бұрын

    My doubt is clarified here. Thank you.

  • @seethalramakrishnan2778
    @seethalramakrishnan27783 жыл бұрын

    Thank you Akshay, it's been an amazing experience. Loved the whole series and waiting for next video. Come back soon

  • @azam11250
    @azam112503 жыл бұрын

    way of explaination is superb. appreciate bro

  • @shubhrankrastogi6260
    @shubhrankrastogi62602 жыл бұрын

    Thanks for making such videos bro!

  • @snehaagarwal1777
    @snehaagarwal17773 жыл бұрын

    Thanks for all the amazing videos ❣️

  • @neelthakkar4492
    @neelthakkar44923 жыл бұрын

    Akshay when the next video is coming? I am really eagerly waiting for it!🤩🤩 Please upload next video 🙏🙏

  • @devendrajangid7887
    @devendrajangid78873 жыл бұрын

    Super series thank you so much for such a great explanation

  • @2bitsbyab
    @2bitsbyab2 жыл бұрын

    bhut acche se samajh aa rha sb👌👌

  • @Trade_Tactix
    @Trade_Tactix Жыл бұрын

    The best video I really appreciate it ☺️

  • @meghajain9299
    @meghajain92993 жыл бұрын

    I love the music in the end.. Literally dancing sometimes to celebrate learning :) :D

  • @rashmidavande4699
    @rashmidavande46992 жыл бұрын

    you know what you are awesome, the way you explain very easy, thanks bro 🙏

  • @kunalsharma1936
    @kunalsharma193615 күн бұрын

    ye meri responsbilite hai aap ke har ek video pe like or comment karna. you deserve this. thank you so much for This video series❤

  • @darshang7133
    @darshang71332 жыл бұрын

    Hey bro seriously I became a big fan of your videos. love you for this content.

  • @snehi56
    @snehi563 жыл бұрын

    Nice explanation..I have followed all your videos so was getting the feeling for 50% time that I already knew this.. Nice revision Did the server extension setup..ready for ur next video..

  • @arkadatta1565
    @arkadatta15652 жыл бұрын

    This is amazing. Loved it.

  • @chrisdietrich1533
    @chrisdietrich15332 жыл бұрын

    aap sabse accha hai. bahut bahut dhanyavaad

  • @avijitbiswas1017
    @avijitbiswas10173 жыл бұрын

    Hi Akshay ! It's been a long time I saw any latest video of yours. Hope you will bring some good news soon. I just wanna share that I have landed my first Full stack job. Prepared for last 1.5 year. I am really thankful to you for making my javascript foundation very very strong. I feel I am much knowledgeable person in company when it comes to Javascript ,all credit goes to you.

  • @prakashbtw678
    @prakashbtw6783 жыл бұрын

    Wow!! Good content. Have been waiting for this. Thanks bro..

  • @dharmik5442
    @dharmik54422 жыл бұрын

    You are doing a really excellent work. I just love your work. Thank you akshay sir

  • @divyabhargavi3365
    @divyabhargavi33653 жыл бұрын

    Hi Akshay, just loving your videos and especially the way you explain the concepts. I would really expecting the videos on design patterns of JavaScript. Could you please focus on that as well? Thank you.

  • @akashsingh-ch5xc
    @akashsingh-ch5xc3 жыл бұрын

    Simply fabulous. Loved this video. Looking forward for HOF..👍👍👍👍

  • @TheBrisker
    @TheBrisker3 жыл бұрын

    Sir please we need more namaste javascript videos .🙏🏼

  • @NiyatiShah24
    @NiyatiShah242 жыл бұрын

    Your passion for Javascript makes me more interested in it tbh!

  • @shikharbansal2942
    @shikharbansal29423 жыл бұрын

    Please complete this series bro!!

  • @ROBINSINGH-ys5kw
    @ROBINSINGH-ys5kw3 жыл бұрын

    Thank you brother for providing such good content .

  • @anupammanitripathi2731
    @anupammanitripathi27313 жыл бұрын

    Theme music and chann se jo tuta koi sapna music😅 is awesome along with whole content. Thanks alot.

  • @ganeshpatil6020
    @ganeshpatil6020 Жыл бұрын

    Thanks a lot, bro. may you get everything you want in your life.

  • @bottlemaaji9193
    @bottlemaaji91933 жыл бұрын

    I recently see your video. Within 2 days I watched it all. I hardly see the technical entertainers like you. It'll be really nice if you upload videos daily 😉

  • @ravicheganti8874
    @ravicheganti88743 жыл бұрын

    Really loved it Bro... and I just liked the explanation each and evrything...

  • @tridiplodh7568
    @tridiplodh75682 жыл бұрын

    Sir your playlist helps me a lot to understand the JS in depth, and it is an honor sir i got your video and enhanced my js knowledge a lot. I have one more request, can you upload playlist for REACT JS as well.

  • @aromal_anil
    @aromal_anil3 жыл бұрын

    Learned something new today 😍. Thanks you Akshay 🙏

  • @ShaileshSingh-hb6gh
    @ShaileshSingh-hb6gh2 жыл бұрын

    Now i can see how my knowledge growing like tree day by day after watching your video .

  • @satyamawasthi7948
    @satyamawasthi79483 жыл бұрын

    I liked before watching it😊

  • @karljosebuena

    @karljosebuena

    3 жыл бұрын

    same here

  • @2bitsbyab
    @2bitsbyab2 жыл бұрын

    nice explanation with example thank you