JavaScript Callback functions | JS Callback for beginners | Function as argument | Callback examples

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.ย. 2024

ความคิดเห็น • 54

  • @durgeshpiplodia8731
    @durgeshpiplodia8731 2 ปีที่แล้ว +4

    Great sir, you are a great teacher !
    why are you not famous ??? and I am wondering why just 3k subscriber.
    I am sure you will shine very soon. Just keep bringing such helpful videos

    • @tapasadhikary
      @tapasadhikary  2 ปีที่แล้ว +1

      Thank you! It means a lot. So far, I’ve not shared about my channel so much but I’m doing it now 😀. Please share about the channel in your circle too ✨

  • @ramzyabdul185
    @ramzyabdul185 4 หลายเดือนก่อน

    Tried it on my own, it was so easy.. but I just need to practice more often with different examples.. I really start enjoying JS as a beginner with your friendly good explanation.. I need more of these tips

    • @tapasadhikary
      @tapasadhikary  4 หลายเดือนก่อน

      Great job! Yes practice, practice hard... start with smaller problems and then think building small application.. that's how you grow and you can do it.

  • @uchennachukwuba
    @uchennachukwuba ปีที่แล้ว +3

    The callback function should have been omitted because it's just logging the same message in the set timeout function. May be it was used just for explanatory purpose

    • @tapasadhikary
      @tapasadhikary  ปีที่แล้ว +1

      Yes, it was used to explain the concept in a beginner friendly way, thanks for watching. Appreciate.

  • @952a259
    @952a259 11 หลายเดือนก่อน +1

    Thank you for a good explanation! Already knew about callback functions, but enjoy to watch your lesson! 👍

    • @tapasadhikary
      @tapasadhikary  11 หลายเดือนก่อน

      Great, glad 💛

  • @kramyshan8121
    @kramyshan8121 ปีที่แล้ว +1

    Very good information. Thank you for your ability to explain all in a simple manner!

  • @saurabrakshit405
    @saurabrakshit405 2 ปีที่แล้ว +1

    Got cleared the concept.

  • @kanikadhyani9709
    @kanikadhyani9709 2 ปีที่แล้ว +1

    If only it took that long for the pizza to be done😂
    Great explanation..Looking forward to more videos in this series..

  • @vivekgedam9359
    @vivekgedam9359 2 ปีที่แล้ว +1

    Nice explain sir.... So Awesome I'm glad for this session

    • @tapasadhikary
      @tapasadhikary  2 ปีที่แล้ว

      Great to hear that, Vivek. More to come 😍

    • @vivekgedam9359
      @vivekgedam9359 2 ปีที่แล้ว +1

      Ok ...I'm wait sir this example really helpful

  • @onyekadonatus4524
    @onyekadonatus4524 2 ปีที่แล้ว +1

    Thanks so much this is really helpful

  • @swapnat111
    @swapnat111 7 หลายเดือนก่อน +1

    Great example🎉

    • @tapasadhikary
      @tapasadhikary  7 หลายเดือนก่อน

      Thank you, glad you liked.

  • @prabhakaranrp8705
    @prabhakaranrp8705 2 ปีที่แล้ว +1

    Subscribed 💖 love your content

  • @anvesh87
    @anvesh87 2 ปีที่แล้ว +1

    in my VS code, variable num is printed as it is.. value of 2 is not passing though it.
    function foo(num) {
    console.log('foo ${num}');
    }
    foo(2);
    console output: foo ${num}
    what am I doing wrong?

    • @tapasadhikary
      @tapasadhikary  2 ปีที่แล้ว

      Change the single quotes with backticks, my friend, it will work. The template literals must be enclosed with a pair of backticks for the expression to evaluate.

    • @anvesh87
      @anvesh87 2 ปีที่แล้ว

      @@tapasadhikary 😀 thank you!

  • @okilemosesebokorait2461
    @okilemosesebokorait2461 2 ปีที่แล้ว

    Nice and clear explanation. Thanks, Tapas.

  • @-Ashish-Singh-
    @-Ashish-Singh- 2 ปีที่แล้ว +1

    Great article

  • @jeff-creations
    @jeff-creations 2 ปีที่แล้ว +1

    Great video thanks!

  • @shyamshukla2803
    @shyamshukla2803 2 ปีที่แล้ว +1

    Quite good explanation sir 👍

  • @syed395
    @syed395 ปีที่แล้ว

    loved your videos sir... i have an doubt on call back...
    let arr = [1,2,3,4,5];
    let fil = function (ele){return ele > 2}
    let p = arr.filter(fil)
    let k = arr.filter(function(){fil()})
    console.log(p)
    console.log(k)
    sir why this k gives empty array .. both p and k are func refrence right?

  • @worldbest3097
    @worldbest3097 ปีที่แล้ว

    im just curious that, i can't understand the difference between just use console.log in orderpizza function and callback function in orderpizza function. whta does it mean by that Robin's phone didn't get message?

    • @worldbest3097
      @worldbest3097 ปีที่แล้ว

      10:01 what does it mean, robin didn't get message?, i mean, orderpizza function without callback, console.log(pizza is ready) after 3 seconds. where i didn't get it

  • @msaikrishna6100
    @msaikrishna6100 2 ปีที่แล้ว +1

    Y did you turned off the subtitles

    • @tapasadhikary
      @tapasadhikary  2 ปีที่แล้ว

      It's enabled now when u turn the CC on. let me know

  • @sreejithuipath6274
    @sreejithuipath6274 ปีที่แล้ว +1

    Please do more js concepts , and coding videos so as a person i can practice, please suggest how to practice coding with js , please suggest any website which is useful for practiceing,

    • @tapasadhikary
      @tapasadhikary  ปีที่แล้ว +1

      There is no better thing than VS Coe. What ever you learn, write code for it.

  • @danidan8227
    @danidan8227 2 ปีที่แล้ว +1

    what's the name of the extension with autocomplete? Thanks!

    • @tapasadhikary
      @tapasadhikary  2 ปีที่แล้ว +1

      Tabnine
      GitHub Copilot

    • @danidan8227
      @danidan8227 2 ปีที่แล้ว

      @@tapasadhikary thanks!

  • @PriyaGupta-be8sw
    @PriyaGupta-be8sw 2 ปีที่แล้ว +1

    Hi Sir , when is the next video coming ?

  • @shyamshukla2803
    @shyamshukla2803 2 ปีที่แล้ว +1

    Please upload full javascript course, I'm waiting

    • @tapasadhikary
      @tapasadhikary  2 ปีที่แล้ว +1

      Will do. Right after the Diwali break 🙂

  • @YugoGautomo
    @YugoGautomo 2 ปีที่แล้ว

    Hi Tapas,
    In your video you showing about chrome console within your VSCode Editor.
    I've tried that console.log but no success.
    Could you show me how to activate that console.
    Thanks.

    • @tapasadhikary
      @tapasadhikary  2 ปีที่แล้ว +1

      Hey Yugo,
      What I did was, install the Live Server extension of VS Code. Then ran the index.html using live server. That opened the app in the browser. From there, I opened the developer tool using F12.
      As my code output was in the console, I had detached the browser developer tool and was showing it side by side of VS Code.
      I hope, it helps. Please let me know.

    • @YugoGautomo
      @YugoGautomo 2 ปีที่แล้ว

      @@tapasadhikary Thanks for your explanation.
      I've tried it, and I thought it was from Menu Help>Toggle Developer Tools.
      What is the difference though do you have any idea ?
      Thanks

    • @tapasadhikary
      @tapasadhikary  2 ปีที่แล้ว +1

      @@YugoGautomo It was from the chrome debugger tool(pressing F12 key on browser) and then change the Dock side setting to open the debugger tool detached from the browser.

    • @YugoGautomo
      @YugoGautomo 2 ปีที่แล้ว

      @@tapasadhikary Thanks.. for your explanation.. I've tried and its works.

  • @AkashGupta-pc2cb
    @AkashGupta-pc2cb ปีที่แล้ว +1

    I feel so dumb to find this example confusing, shit I'll never understand callbacks