JavaScript this Keyword

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 14. 05. 2018
  • JavaScript this Keyword
    đŸ”„Get my complete JavaScript course: bit.ly/2M1sp4B
    Subscribe for more videos:
    / @programmingwithmosh
    Want to learn more from me? Check out my blog and courses:
    Courses: codewithmosh.com
    Blog: programmingwithmosh.com
    Facebook: / programmingwithmosh
    Twitter: / moshhamedani

Komentáƙe • 534

  • @MosheSchnitzler
    @MosheSchnitzler Pƙed 3 lety +117

    "This" was the first word I said as a baby. I can't believe that I'm still stuck here...

    • @daniyahaider6468
      @daniyahaider6468 Pƙed 3 lety

      lol

    • @sohailaali2081
      @sohailaali2081 Pƙed 3 lety

      Did figure it out what exactly is it?? Plaeseeeeeee explain me in simple words😭😭

    • @CapeSkill
      @CapeSkill Pƙed 2 lety +2

      @@sohailaali2081 The keyword ''this'' is basically an object that is binded to the function that is being executed.

    • @sohailaali2081
      @sohailaali2081 Pƙed 2 lety

      @@CapeSkill yeah thanks but I already had figured it out last monthđŸ˜‚đŸ˜‚â€ïž

    • @CapeSkill
      @CapeSkill Pƙed 2 lety +1

      @@sohailaali2081 It's not really as difficult as people make it seem to be.

  • @nithin1674
    @nithin1674 Pƙed 3 lety +75

    "this" ain't stopping me from going forward in my path.

  • @nyxmediaentertainment8723
    @nyxmediaentertainment8723 Pƙed 4 lety +191

    " 'this' references the object that is executing the current function" ..simple, yet enlightning.. thanx!

    • @Ethan-hm4qr
      @Ethan-hm4qr Pƙed 3 lety +4

      Thanks! This saved me from a lot of confusion

    • @akashkrishna1873
      @akashkrishna1873 Pƙed 3 lety

      Me too commotion solved

    • @NINJA29A
      @NINJA29A Pƙed 2 lety +1

      “this” is a very useful keyword, I didn’t know it until now I wrote 5 lines of code to do its job.
      instead I could use “this” one keyword, lol.

    • @mohitrajput6007
      @mohitrajput6007 Pƙed 2 lety +2

      This simple line explains the entire concept

    • @crystall_sh
      @crystall_sh Pƙed rokem +1

      It's not that simple you have to know it's properties where to implement it..

  • @MsElsospechoso28
    @MsElsospechoso28 Pƙed 5 lety +776

    THIS is where I quit programming.

    • @ecosunflower1892
      @ecosunflower1892 Pƙed 4 lety +21

      I can feel you. Not really noob friendly but you can do it!

    • @ganeshchokhare7525
      @ganeshchokhare7525 Pƙed 4 lety +5

      first watch this, It will help you czcams.com/video/n_9oUP1GQz0/video.html

    • @justafreak15able
      @justafreak15able Pƙed 4 lety +13

      How are you on every single video I watch?

    • @jagdeesh9338
      @jagdeesh9338 Pƙed 4 lety +3

      😂😂nice comment

    • @memeyan9874
      @memeyan9874 Pƙed 4 lety

      i think the "this" issue on javascrpt may just a historicol probrem from the source code,on me case,when i learn python code,i never have any kind of probrem like this

  • @oloyang431
    @oloyang431 Pƙed rokem +14

    One thing you forgot to mention is that if you use an arrow function instead regular function when using a forEach() method in your example the keyword "this" actually refers to the object, and not the global window. So basically, "this" acts differently depending on whether you're using a regular function or an arrow function.

    • @marvinalone
      @marvinalone Pƙed rokem

      because arrow function creates a closure, it's similar to
      var that = this
      this.tags.forEach(function(tag) {
      console.log(that.title, tag)
      })

    • @AkashhGuptaa
      @AkashhGuptaa Pƙed rokem +1

      @@marvinalone man your keywords tags that this really confused me

    • @fleurdecerisier9550
      @fleurdecerisier9550 Pƙed 5 měsĂ­ci

      😱😱

  • @iLoveTurtlesHaha
    @iLoveTurtlesHaha Pƙed 5 lety +13

    Honestly, this makes so much sense to me. When people were telling me the 'this' in JavaScript is complicated I was worried that I would struggle to learn it but it makes so much sense if you stick to the rules for methods, functions, and constructor functions.

  • @bileljribi6977
    @bileljribi6977 Pƙed 5 lety +107

    I rarely make comments on CZcams, I just want say THANK YOU, this is by far the best explanation for the "this" keyword I have found!

  • @prabdeepdhaliwal9725
    @prabdeepdhaliwal9725 Pƙed 3 lety +18

    So from my understanding:
    NOTE:
    A *method* is a function within an object.
    A *callback function* is a function passed as an argument/parameter within another function.
    ==============================================================================
    1. The *'this'* keyword *refers to the global object* (window) when using 'this' *within* a *function*
    Ex. function Hello() {
    console.log(this)

    • @DS-rv2fc
      @DS-rv2fc Pƙed rokem +1

      honestly, just use an arrow function instead of inserting "this"

    • @burekburczynski9802
      @burekburczynski9802 Pƙed rokem

      @@DS-rv2fc hi, where is the next lecture of 'this' topic? i searched on YT list but I see nothing to be continue of 'this' lecture...

    • @user-xw3uj8ij6v
      @user-xw3uj8ij6v Pƙed 2 měsĂ­ci

      It's a myth that content creators keep copying. An object does not own a function, it just has a reference to a function no matter where we declare the function inside the object or outside. The "this" binding is due to 'the dot notation' which is described by ECMAScript standard "13.3.2 Property Accessors" "theObject.theProperty".
      function Hello() {
      console.log(this)
      }
      const obj = {
      hello : Hello
      }
      obj.hello() // this is obj
      const myHello = obj.hello;
      myHello() "this" will be undefined if it's 'use strict' or global object depends on host environment (node.js , browser, ect.)
      example with forEach just special case of no dot notation, arrow functions fix that because that kind of functions use parent environment which was called with dot notation)

  • @kduisheev4355
    @kduisheev4355 Pƙed 3 lety +198

    still could not manage to explain to my 7 yrs old brother.

    • @sukhdevduhariya3280
      @sukhdevduhariya3280 Pƙed 3 lety

      hahaha

    • @mohammaddh8655
      @mohammaddh8655 Pƙed 3 lety +12

      i don't know about your brother but I'm 24 and I'm fucked

    • @ayoubZaZen
      @ayoubZaZen Pƙed 3 lety +1

      @@mohammaddh8655 same hhhhhhhhhhhhhhhhhh

    • @bryanurizar
      @bryanurizar Pƙed 3 lety

      What a dumbass. A 7 year old struggling to understand this.

    • @awekeningbro1207
      @awekeningbro1207 Pƙed 3 lety +12

      i tried to explain this to my 7 year old brother, then i realized i don't have one.

  • @ganeshbabu6458
    @ganeshbabu6458 Pƙed 4 lety +10

    Without you, I wouldn't have learnt Angular. You're the best lecturer out there Mosh...

  • @JeremyGalloway
    @JeremyGalloway Pƙed 5 lety +45

    0:25 hands down best "this" definiton I've come across. There is an entire "You Don't Know JavaScript" book dedicated to this exact topic, yet the entire book could not explain it as well as you just did in one sentence...

    • @1998charan
      @1998charan Pƙed 5 lety

      How about the (this & Object prototypes) portion of "You Don't Know Javascript"?
      Till that part stands Great. What is your opinion?

    • @Jimmy-vx7mk
      @Jimmy-vx7mk Pƙed 4 lety

      @@1998charan dai ala

    • @1998charan
      @1998charan Pƙed 4 lety

      @@Jimmy-vx7mk you came to see 'this' it seems :)
      Intha mottaiyan nalla solluvan

    • @Jimmy-vx7mk
      @Jimmy-vx7mk Pƙed 4 lety

      @@1998charan, my dumb ass still can't understand it.

    • @nyxmediaentertainment8723
      @nyxmediaentertainment8723 Pƙed 4 lety

      Yeap! I felt it too! Very well put!

  • @rodrigoribeiro377
    @rodrigoribeiro377 Pƙed 4 lety +4

    THIS is an incredible explanation... not only about the reserverd word 'this' but also about the behaviour of structures that uses 'this' such as constructor functions. It cleared my mind. Thanks!

  • @Mattou2812
    @Mattou2812 Pƙed 5 lety +7

    You are a very good teacher. now i understand the basics of this thanks to you. I love your Javascript videos I've learned a lot of things thanks to you. Thanks a lot for sharing your knowledges.

  • @taleoftravels6701
    @taleoftravels6701 Pƙed 4 lety +105

    Trying to summarize 'this' after watching this video for at least 5th time:
    For fns inside Objects: 'this' refers to the object calling the function.
    For fns not called by objects - Eg call back functions - 'this' refers to the global object.
    For fns defined using arrow functions - 'this' simple refers to the object that is executing the arrow function - Irrespective of object's scope. Meaning: if the arrow function is called from a global scope? 'this' will refer to the global object. If the arrow function is called with in a function which belongs to an object?'this' will refer to the calling function's scope and in this case the object itself.

    • @dingdong8704
      @dingdong8704 Pƙed 4 lety +8

      you confused about what i had learnt till now, thanks to me for reading your comment.

    • @nirajankhadka2661
      @nirajankhadka2661 Pƙed 4 lety +4

      Can somebody summarize this comment further for me plss

    • @theSUBVERSIVE
      @theSUBVERSIVE Pƙed 4 lety +7

      I think it means that in the last example, if instead of:
      1) this.tags.forEach(function (tag) {console.log(this.title, tag}, this)
      2) this.tags.forEach((tag)=>{console.log(this.title, tag)}
      he could get the same result by using an arrow function instead because it would inherit the _this_ from above, calling the Object itself

    • @thanachon8892
      @thanachon8892 Pƙed 3 lety +3

      "THIS" is all summary that I want for enlightened myself. Thank you!

    • @omageprosper9673
      @omageprosper9673 Pƙed 2 lety

      thanks

  • @swethanaik7121
    @swethanaik7121 Pƙed 3 lety +9

    "This" is so well explained. Such an eye opener since I have always been confused with the "this" keyword in Javascript since it can mean different things depending on its placement unlike in Java which is pretty straightforward.

  • @antonmariadas7747
    @antonmariadas7747 Pƙed 3 lety +7

    Best explanation ever. Simple, concise and very clear.

  • @flaviohenrique5294
    @flaviohenrique5294 Pƙed 2 lety

    You explain so simples and direct that I couldn't understand why I didn't figured out this before. Thanks man, best didactic ever.

  • @sucesssoulman
    @sucesssoulman Pƙed 4 lety +2

    Thank you!!!! your explanation is THE BEST!!!!! I understood the concept. There is nothing difficult when someone explains it as clear as possible.

  • @anifsayed3563
    @anifsayed3563 Pƙed 4 lety +2

    This is by far the best explanation of this. I was struggling to understand the concept. Thank you very much.

  • @siddharthmagadum16
    @siddharthmagadum16 Pƙed 3 lety +2

    I heard this channel a lot. By watching THIS first video, I got to know THIS is an awesome channel . Crystal clear explanation. Thanks a lot. Subscribed!

  • @cowabungatv4159
    @cowabungatv4159 Pƙed 5 lety +2

    Indeed the best tutorial on this i've seen so far

  • @nizamuddinshaikh3185
    @nizamuddinshaikh3185 Pƙed 5 lety

    Simple, concise and to the point explanation shown! Thanks for sharing.

  • @MohiyuddinShaikh
    @MohiyuddinShaikh Pƙed rokem +2

    This was one of the most beautiful explanation on "this" topic. Heading out to solve some quizzes based on this concept to solidify my learning.

  • @the_yugandharr
    @the_yugandharr Pƙed rokem

    Bro this stuff is insane. You're an amazing teacher. No doubts left. Thanks a lot Mosh!

  • @BobbyBundlez
    @BobbyBundlez Pƙed 4 lety +2

    ONE MINUTE IN AND HE ALREADY CLEARED UP SO MUCH

  • @therealorberon
    @therealorberon Pƙed 6 lety +2

    I need to watch and re-watch this a few times. to get and remember it.

  • @Mu-tp6es
    @Mu-tp6es Pƙed 5 lety +10

    so basically this references the parent of wherever its called unless its called in an ordinary function then it references window

    • @RickyRicheRebelle
      @RickyRicheRebelle Pƙed 5 lety +2

      with many MANY exceptions, such as with callbacks, anonymous function expressions, arrow syntax etc etc... still very complicated

  • @idhamhafidz
    @idhamhafidz Pƙed 4 lety +3

    I finally understand the part where you add this after callback funtion

  • @stephen1569
    @stephen1569 Pƙed rokem

    I loved this video. It untied the “this” knot in my head. MANY THANKS !!!!

  • @denisatanase7548
    @denisatanase7548 Pƙed 4 lety +1

    Now I really get it omg...also with the 'new' keyword, many thanks!

  • @priyamganguly
    @priyamganguly Pƙed 3 lety

    A small, yet complex, topic made easy through this simple video. Thanks!

  • @kushalkumar4970
    @kushalkumar4970 Pƙed 4 lety

    Wow! You just taught me in first 1 min which I needed the most. Thanks a ton!

  • @harshitkhanna7688
    @harshitkhanna7688 Pƙed 5 lety

    That was a good short explanation. Thanks Mosh.

  • @machine352
    @machine352 Pƙed 2 lety

    Very good video, alem de ter entendido melhor o uso do this i felt happy that I understood practically everything even though I was a Brazilian student of English. Thanks for the class

  • @katkodes6055
    @katkodes6055 Pƙed rokem +1

    I've been trying to understand this for over 48 hours and I finally get it!! Thanks :)

    • @alcestabyss3305
      @alcestabyss3305 Pƙed rokem +1

      Hi, from which sourse are you learning java script? 😊

    • @katkodes6055
      @katkodes6055 Pƙed rokem +1

      @@alcestabyss3305 mainly the Odin project and published books

  • @user-eu7bh5mt5s
    @user-eu7bh5mt5s Pƙed 5 lety

    Thank u a lot Mosh. That was a very clear and good explanation. Helped me a lot with something that was quite unclear to me up to this point :)

  • @smilejayden-553
    @smilejayden-553 Pƙed 4 lety

    Very thanks for a CLEAR explain about 'this'. Love Mosh from Korea

  • @geralddarkobekoe
    @geralddarkobekoe Pƙed 5 lety +1

    Thank you a bunch
    It helped me a lot

  • @deepak8586
    @deepak8586 Pƙed 2 lety

    This is where I actually I learnt about this!!! thank you so much none in my college explained like this about this!

  • @haythamkenway8343
    @haythamkenway8343 Pƙed 4 lety

    This is the best explanation of 'this' keyword. Thanks a lot mosh 🙂

  • @andrew.schaeffer4032
    @andrew.schaeffer4032 Pƙed rokem

    Bravo. I've watched several videos on the this keyword and this is the best one yet

  • @1vigneshram
    @1vigneshram Pƙed 3 lety

    I really loved it mosh!!! very confused before now got clear understanding of how this works with practical knowledge

  • @PoetNoPoems
    @PoetNoPoems Pƙed 5 lety +1

    Says it’s complicated from poor teaching material then minute one of his explanation and I’ve got it. Top sh#t mate, thanx

  • @dobromirkrastev7426
    @dobromirkrastev7426 Pƙed 4 lety

    Excellent explanation. Thank you, Mosh!

  • @domenicocucinotta2720
    @domenicocucinotta2720 Pƙed 3 lety

    First Time I really understood the this keyword! Thanks Mosh,you are a 🌟

  • @Joni67sinix
    @Joni67sinix Pƙed 3 lety

    maaann, I can't explain how much you helped me with this video. congrats for your didactics and thanks a lot!!!!

  • @alessandroporfirio1910
    @alessandroporfirio1910 Pƙed 6 lety

    Thank you for this lecture! It was great!
    Btw, are there a relation between the global object and the global scope besides that both are global? Is the global scope a property of the global object?

  • @m.smanoj4688
    @m.smanoj4688 Pƙed 4 měsĂ­ci

    AWESOMELY EXPLAINED - EVEN PAID COURSES CANNOT COME NO WAY NEAR THIS KIND OF EXPLANATION LIKE THIS

  • @janescookinglab
    @janescookinglab Pƙed 4 lety

    Thank you! This is very helpful!

  • @mdirshath4174
    @mdirshath4174 Pƙed 2 lety

    Thanks for the clear explanation. You really explain complex topics easily understandable. Thank you so much!!!

  • @smrutikantnayak3652
    @smrutikantnayak3652 Pƙed 3 lety

    Mosh, literally i was laughing while the console.log logged this keyword inside the call back.... A great 8 and half minutes spent.. Thank you...

  • @pannihto7588
    @pannihto7588 Pƙed 4 lety

    Thank you. It's much more clear now

  • @fidtran4991
    @fidtran4991 Pƙed 4 lety

    Thank you so much for this lecture. I watched a bunch of videos but still got confuse. With your clear clarifications I feel much more confident learning programming!!!

  • @hadircadumitru760
    @hadircadumitru760 Pƙed 4 lety

    thank you for a clear explanation of everything, and good English accent

  • @naumanraees2932
    @naumanraees2932 Pƙed 3 lety

    Mr. Mosh you are really great sir, your teaching style, explanation and your knowledge helped me a lot to clear my ideas

  • @Aarmaxian
    @Aarmaxian Pƙed 5 lety

    Thanks. A very easy to understand and abundantly clear video.

  • @abebazouie5672
    @abebazouie5672 Pƙed 4 lety

    Damn!!! That was so straightforward. Thankssss!

  • @narekmalkhasyan9636
    @narekmalkhasyan9636 Pƙed 4 lety

    Thank you very much. The easiest explanation for --this--
    keyword.

  • @akshaybhatt2136
    @akshaybhatt2136 Pƙed rokem

    This is by far the best and the simplest video on 'This'

  • @faisalahmed9434
    @faisalahmed9434 Pƙed 4 lety

    Mosh is always a good teacher!!

  • @GuitarreroDaniel
    @GuitarreroDaniel Pƙed 3 lety

    Wow, this was so well explained. Thank you very much!

  • @joeyschmitz6882
    @joeyschmitz6882 Pƙed 5 lety

    Awesome explanation. Thanks!

  • @tyrodev5281
    @tyrodev5281 Pƙed 2 lety

    Now "this" is what I came for! Thanks Mosh!

  • @kevinmuchene8660
    @kevinmuchene8660 Pƙed 2 lety +2

    Excellent video. By using arrow function ie this.tags.forEach(tag => console.log(this, tag)) works. This is because an arrow function doesn't have its own this value. Instead, it uses this value of the enclosing lexical scope.

  • @atlasmaxima1418
    @atlasmaxima1418 Pƙed 5 lety +3

    Wow, I watched only the first minute and it makes so much sense now than trying to read articles about it!

    • @iLoveTurtlesHaha
      @iLoveTurtlesHaha Pƙed 5 lety

      LMAO, I was trying to read a stupid article as well before leaving it and coming here. XD

    • @serranomorante
      @serranomorante Pƙed 5 lety

      so true.

  • @albertofabbri1543
    @albertofabbri1543 Pƙed 4 lety

    Very nice and clear explanation. Thank you very much!

  • @drakecoleman9364
    @drakecoleman9364 Pƙed 3 lety

    The first part of your video is th goal for every tutorial out there. And when you made those claims in the begining that you would have the best way to explain it and understand, that inherently put a lot of pressure on you from me, since this video was a quick search to go over it for a different bigger part of my learning, and this is something thats been confusing me..
    Well, tbh with you.
    You succeeded.
    Well Done man. You did amazing explaining it, and I am in your debt.

  • @exploreasanaussiemillenial

    You Sir, are a champion, Thank You!

  • @pawekalewski8554
    @pawekalewski8554 Pƙed 6 lety +1

    Great video,
    Thank you ! :)

  • @elgary9074
    @elgary9074 Pƙed 3 lety

    Well explained!. Thank you Mosh!

  • @guycohen4403
    @guycohen4403 Pƙed rokem

    Thank you for the last part with the foreach, I didn't know that callback functions behave like that I didn't know how to fix it until now

  • @lucasfelipe-ze5sy
    @lucasfelipe-ze5sy Pƙed 5 lety +3

    finally, I understood this

  • @yeeli7989
    @yeeli7989 Pƙed 5 lety +236

    This is complicated

    • @jsonkody
      @jsonkody Pƙed 5 lety +4

      No it really is not. Learn more basic stuff. Then make some things. Then come back again, you'll see ;)

    • @Anniek62
      @Anniek62 Pƙed 5 lety +63

      explained to my 7 year old nephew. he died

    • @frugglewiggle
      @frugglewiggle Pƙed 5 lety +1

      nice pun

    • @sarangcheruvattil5762
      @sarangcheruvattil5762 Pƙed 4 lety

      @@Anniek62 LMFAO :D :D :D

    • @BobbyBundlez
      @BobbyBundlez Pƙed 4 lety

      @@Anniek62 LMFAOOO

  • @itsthomasYT
    @itsthomasYT Pƙed 6 lety

    Mosh, damet garm. Hichwaght fekr nemikardam ke behtarin moalleme donya ye Hamwatan bashe. Merci. Zemanan man ta hala 2 ta az coursato kharidam.
    I wish you could create a course about JavaScript Debugging for a real world project. There is nothing like this any where on the web.

  • @davidtran1360
    @davidtran1360 Pƙed 2 lety

    Great video. I fully undertand "this" now

  • @katiushka22
    @katiushka22 Pƙed 4 lety +1

    THIS was driving me crazy until I watched your video. Thanks!!!

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars Pƙed 10 měsĂ­ci

    simple and to the point, thank you ;)

  • @amirsaeidi7136
    @amirsaeidi7136 Pƙed 3 lety

    Mosh! thank you. It could not have been explained simpler than THIS. :)))

  • @Allisondeluca
    @Allisondeluca Pƙed rokem

    Thanks. Had to watch twice but now I understand.

  • @note5819
    @note5819 Pƙed 4 lety

    great video, thx!
    what coding environment were you using? is is an online one like jsfiddle or a os X app

  • @atulcodex7730
    @atulcodex7730 Pƙed 5 lety

    Best video to understand this keyword thank u :) Mosh

  • @alex-dk2rj
    @alex-dk2rj Pƙed 5 lety

    Great explanation!

  • @musafurkankeskin8411
    @musafurkankeskin8411 Pƙed rokem

    Great, brief and simple loved it 👍

  • @michaelrosenfeld8055
    @michaelrosenfeld8055 Pƙed 2 lety

    Thank you so much for this. One simple sentence and it somewhat clicked for me.

  • @MRAMetharam
    @MRAMetharam Pƙed rokem +2

    Have you even noticed that "this" is also different if you build a function using the arrow syntax vs the "function" keyword? Great video BTW.

    • @degenyakuza
      @degenyakuza Pƙed rokem

      this keyword doesn’t work on arrow function

    • @megl1cious
      @megl1cious Pƙed rokem

      when is in a fat arrow function, this, takes the value of the class where it belongs. In case we haven't given a class it automatically takes class as document class.

  • @80Vikram
    @80Vikram Pƙed 3 lety +8

    7:20 you've mentioned that's topic for next lecture. Please clarify where can I find "next lecture" ?

    • @Snoo29293
      @Snoo29293 Pƙed 3 lety +3

      I don't know what exactly he was going to include in that lecture, however, for those curious to find out a way to solve that problem, from what I know, you could simply use arrow function instead of normal function, arrow function treats this differently than normal functions, that's the main reason arrow functions of ES6 are so cool, one advice I have in order to avoid errors in complicated codes is to use classes for object constructors, functions in the global scope and for object.prototype properties and use arrow functions everywhere else.

  • @ailanj8221
    @ailanj8221 Pƙed 6 lety

    great explanation, and by the way, can I know what IDE are you using?

  • @shivarammuthukumaraswamy7164

    Amazing explanation.Thank you so much.

  • @alagappank1242
    @alagappank1242 Pƙed 2 lety

    Only video in you tube that clears the "this" keyword conceptđŸ’„

  • @arthurnino93
    @arthurnino93 Pƙed 4 lety

    Favorite tutor mentor in programming

  • @Emre-hr8vf
    @Emre-hr8vf Pƙed rokem

    Cleanest "this" explanation in youtube, thanks for sharing.

  • @2010chalupa
    @2010chalupa Pƙed 10 měsĂ­ci

    Great explanation!!! Learning Typescript here and needed a clear explanation like this one!

  • @emmanuelagwu2953
    @emmanuelagwu2953 Pƙed měsĂ­cem

    Thank you so much for this explanation. it makes the concept of the "this" keyword very clear

  • @aninexclusive466
    @aninexclusive466 Pƙed rokem

    That was so much helpful!

  • @hatrer2244
    @hatrer2244 Pƙed 4 lety

    Quality stuff!
    Thanks

  • @ghosthail
    @ghosthail Pƙed 4 lety

    Great video. Such a clear explanation.

  • @CheeCarniel
    @CheeCarniel Pƙed 10 měsĂ­ci

    The best so far... clearly understood.

  • @bibekkhatri
    @bibekkhatri Pƙed 3 lety

    Mosh! your explanation is clear and concise.

  • @Yadavpankaj28
    @Yadavpankaj28 Pƙed 5 lety

    awesome explanation .. Thanks

  • @kunalrajput4539
    @kunalrajput4539 Pƙed 4 lety +1

    if you use arrow function this will refer to video object not the window object so no need to use forEach