Solving problems with Execution Context, this, and Timers

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

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

  • @RemzM
    @RemzM Год назад +2

    Jesus! Finally I got it why do we lose the execution context and This = window when we write ( obj.method, 1000 ) inside a timer. Thank you very much!

  • @Kay_Drechsler
    @Kay_Drechsler Год назад +1

    Very good explanation with easy to understand examples. It's always funny to wrap my head around execution context, this and when I need to use the .bind() method.

  • @jimshtepa5423
    @jimshtepa5423 Год назад +1

    Thank you! Very very clear explanation. I finally start to understand concept of execution context and how to configure it in different cases.

  • @macusdesir6830
    @macusdesir6830 Год назад +1

    Thanks!

  • @macusdesir6830
    @macusdesir6830 Год назад +1

    Such an amazing video!

  • @dodokwak
    @dodokwak Год назад +1

    Thx. Very helpful.

  • @jimshtepa5423
    @jimshtepa5423 Год назад

    5:34 what is the reason to add the method instead of putting the in the body of the function? Does running an empty function with the 'new' word in front of it create an object literal?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад

      yes.
      function x {
      //empty function
      };
      x(); //returns undefined.
      new x(); //returns { }
      ruclips.net/video/UrM9xgPxq1E/видео.html

  • @jimshtepa5423
    @jimshtepa5423 Год назад

    out of curiousity, what drives you to invest resources (time, human effort etc) to create these materials and publish them? The quality of the content is so good even compared to paid ones

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад +3

      It started as a resource for my students and then grew as I saw how many more people I could actually help.
      I like hearing success stories from my subscribers.
      And I make a few dollars through advertising.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад +1

      I still use it as a resource for my own students.
      What I am actually teaching in class is a huge driver for what videos I make next.

  • @ameenbari6758
    @ameenbari6758 Год назад

    hi, I have seen .bind(this), what is the point of doing this? it was like foreach(function(){ //some code }.bind(this)); can you please help me

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад

      It has to do with closures and the changing meaning of `this` in JS depending the execution context
      ruclips.net/video/uBdH0iB1VDM/видео.html
      ruclips.net/video/eWDXgsIgTGk/видео.html

  • @viral_agent0
    @viral_agent0 Год назад

    How to remove black space from video html css javascript