JavaScript "this" Keyword Explained

Поділитися
Вставка
  • Опубліковано 29 вер 2024
  • In this video I'll be explaining in the simplest terms what the "this" keyword is in JavaScript. It's not as hard as many developers may think 🙂
    Check out my similar video on the "bind" keyword, here:
    • Bind Explained in Java...
    For your reference, check this out:
    developer.mozi...
    💜 Join my Discord Server:
    / discord
    Support me on Patreon:
    / dcode
    Follow me on Twitter:
    @dcodeyt
    If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
    #dcode #javascript

КОМЕНТАРІ • 39

  • @Pareshbpatel
    @Pareshbpatel Рік тому

    Nice introduction to the "this" keyword/concept. Thanks, Dom.
    {2023-06-19}

  • @henryshen5445
    @henryshen5445 2 роки тому

    I found that it will work for function(){}, but if you use ()=>{} the arrow function won't work. Video around 3:20

  • @amonraii7273
    @amonraii7273 3 роки тому

    Who you're kidding man. If you're 50 years old, then I'm Marlin Brando

  • @qcmira2024
    @qcmira2024 3 роки тому +2

    Oh my god ! You made it so simple and easy to understand something I’ve spent hours trying to understand properly ! Thanks man !

  • @aravindelumalai8727
    @aravindelumalai8727 2 роки тому

    what theme for editor you are using? its simply looks cool

  • @justtestingmycurrentskills747
    @justtestingmycurrentskills747 3 роки тому +2

    Dcode, can you make a tier list of programming languages or frameworks? Would be interesting to hear your opinion.

  • @jmmmmmmmmmk
    @jmmmmmmmmmk 2 місяці тому

    Thank you you explained this very well

    • @dcode-software
      @dcode-software  2 місяці тому

      I'm glad to hear it. I think it's actually a lot simpler than most people think.

  • @taunado
    @taunado 2 роки тому

    Thanks!

  • @boyacosweep
    @boyacosweep Рік тому

    Please make more videos explaining this stuff. I must have watched like 7 in which they all explained it in the most confusing way or only within the context of objects. The freecodecamp one was BRUTAL.

  • @jaybanks7718
    @jaybanks7718 3 роки тому

    Don't understand why you would use "this" simply for readability reasons, given that it can mean different things when used in different circumstances, and it isn't always obvious in which context it is being used. For many years, I have kind of stayed on the server side, because it seemed like Javascript was developed by teens that made it up as they went along. Stuff like "this" makes me think I was right.

  • @rangabharath4253
    @rangabharath4253 3 роки тому +1

    Awesome 👍

  • @jamesmassa1999
    @jamesmassa1999 3 роки тому +1

    This video was informative. Thanks again, Dom!

  • @Dexter101x
    @Dexter101x 3 роки тому +1

    Brilliant, just what I wanted

  • @rolandpierrelouis4013
    @rolandpierrelouis4013 3 роки тому

    Hi my friend..thanks for this great video. Do you have some videos about Design Patterns please ?

  • @ChrisAthanas
    @ChrisAthanas 3 роки тому

    Speaking about the keyword "this" and the location "this" is S U P E R C O N F U S I N G

    • @ChrisAthanas
      @ChrisAthanas 3 роки тому

      We need a better way to speak about the keyword vs the location identifier

  • @YellowPanamka
    @YellowPanamka 3 роки тому

    Man if i had teacher like you before, i would have doctor's degree in programming already.

  • @rostyslav5334
    @rostyslav5334 3 роки тому

    5:36 - the most confusing part of JS 'this' keyword - is arrow functions

  • @starterdev
    @starterdev 3 роки тому

    Please make a video about idempotent, and other concepts like this

  • @emperoroftheearth3215
    @emperoroftheearth3215 3 роки тому

    Thanks .. i understood it well now. Thanks again

  • @sandip_bettereveryday
    @sandip_bettereveryday 3 роки тому

    Thanks for keeping it so simple.

  • @beinyourguard
    @beinyourguard 3 роки тому

    thanks!

  • @solguatelli9130
    @solguatelli9130 3 роки тому

    Great explanation!

  • @bangias9166
    @bangias9166 3 роки тому

    Love it

  • @TheLuckyyy13
    @TheLuckyyy13 3 роки тому

    The part with event listeners is exactly what i was looking for and didnt find in any other tutorial. Now i got it. Thanks.

  • @sohimurosohimuro322
    @sohimurosohimuro322 2 роки тому

    The only video on UA-cam that actually did explain what "this" is. Thank You!

    • @dcode-software
      @dcode-software  2 роки тому

      Glad it helped you!

    • @amitkumargupta-
      @amitkumargupta- 2 роки тому

      I bet , You'll forget this after this video. this is the nature of this

  • @josephwong2832
    @josephwong2832 3 роки тому

    wow dude I finally understand!!

  • @DavidJJJ
    @DavidJJJ 3 роки тому +4

    How do you know a programming language is broken? It takes almost 8 minutes to describe the meaning of one word.

  • @zomalee4512
    @zomalee4512 3 роки тому

    Dom you cover php??

    • @dcode-software
      @dcode-software  3 роки тому

      Not entirely, but I have used it in previous videos