What Does "(e)" Mean in JavaScript? - Event Handler Object Explained

Sdílet
Vložit
  • čas přidán 26. 07. 2021
  • The one thing that always confused me when I was learning JavaScript was what exactly the "e" or "ev" was when using events on things like button clicks or mouseovers - in this video, we take a look at how this object is useful for JavaScript coding.
    For your reference, check this out:
    developer.mozilla.org/en-US/d...
    🏫 My Udemy Courses - www.udemy.com/user/domenic-co...
    🎨 Download my VS Code theme - marketplace.visualstudio.com/...
    💜 Join my Discord Server - / discord
    🐦 Find me on Twitter - / dcodeyt
    💸 Support me on Patreon - / dcode
    📰 Follow me on DEV Community - dev.to/dcodeyt
    📹 Join this channel to get access to perks - / @dcode-software
    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

Komentáře • 88

  • @dcode-software
    @dcode-software  Před rokem

    *RELATED VIDEO: COMPLETE OVERVIEW OF JAVASCRIPT EVENTS*
    czcams.com/video/YiOlaiscqDY/video.html
    🏷 *THE ULTIMATE JAVASCRIPT DOM CRASH COURSE* 👇
    www.udemy.com/course/the-ultimate-javascript-dom-crash-course/?referralCode=DC343E5C8ED163F337E1

  • @dcode-software
    @dcode-software  Před 2 lety +26

    As a few people have pointed out, the parameter "e" can be named anything. Other common names for the event object parameter is "ev", "evt" or "event".

  • @basmong
    @basmong Před 10 měsíci +10

    Here it is. If you call it not an event ("e" or "event"), but an object, then everything immediately becomes clearer. This is an event OBJECT! And this object has properties: .target, .ctrlKey, etc.
    Thanks for the video.

  • @naugustus939
    @naugustus939 Před rokem +5

    Out of all the videos. I found this to be easiest and straight to the point. Thank you sir.

  • @kelofarrar
    @kelofarrar Před 2 lety +3

    Great video and advice! I was a little hazy on my full understanding of the Event object , now I full understand it!

  • @khlfff2
    @khlfff2 Před 2 lety +4

    Great video man! Made this a lot clearer for me. Subscribed!

  • @JoeyGuess
    @JoeyGuess Před 2 lety +2

    Wow, very well explained. This helped a lot. Thank you!

  • @sophiequin3353
    @sophiequin3353 Před 2 lety +13

    That's great! This is exactly what I needed to understand event.target. Thank you!

  • @christopherlangley695

    Thank you, this video made it easier to grasp the concept behind the event object

  • @thydevdom
    @thydevdom Před 2 lety

    This makes things so much clearer

  • @sampreetkumar6739
    @sampreetkumar6739 Před 20 dny

    Thanks man straight to the point, solved my doubt.

  • @DesignToDeploy
    @DesignToDeploy Před rokem

    I am searching for this finally I found it. Thank u so much.

  • @daprone4949
    @daprone4949 Před 2 lety

    Thank you bro, I was stuck with this, now you explained.

  • @prathvisingh8288
    @prathvisingh8288 Před 2 lety +9

    Crystal clear explanation. CRYSTAL!

    • @LaGrossePaulik
      @LaGrossePaulik Před 2 lety +2

      I was about to write the same exact words: crystal clear! You're very right. I know sometimes people or teacher's methods are fine for some persons, but I didn't really get it since this video.

    • @prathvisingh8288
      @prathvisingh8288 Před 2 lety +1

      @@LaGrossePaulik I also understood only after watching this video

  • @jayteecollins1279
    @jayteecollins1279 Před 7 měsíci

    well done explaining this! Keep it up❤

  • @VarunPats
    @VarunPats Před 3 lety

    Short and sweet! 👌

  • @bishalsenhdri7655
    @bishalsenhdri7655 Před 3 lety +1

    Short & Sweet 🔥✌️

  • @TheUnown4
    @TheUnown4 Před 2 lety

    Thank you, perfect explanation

  • @tomasnovakovic1309
    @tomasnovakovic1309 Před 2 lety

    great explanation!

  • @alidakhil3554
    @alidakhil3554 Před 2 lety

    Brilliant as usual.

  • @christianarroyo3033
    @christianarroyo3033 Před 2 lety +4

    That was awesome. Thank you. When you showed console.log(e) and it was an object! my mind was blown

    • @dcode-software
      @dcode-software  Před 2 lety +1

      You're welcome! That's exactly what I was going for with this video. Glad you liked it 🙂

  • @tonelloalan
    @tonelloalan Před 7 měsíci

    Thanks for the simple and straight forward explanation!

  • @lunasoleil2827
    @lunasoleil2827 Před 2 lety

    Thank you! So concise!

  • @rahulshekar907
    @rahulshekar907 Před rokem

    This was very confusing to me. Thanks a lot for clearing

  • @AyguelYildirim
    @AyguelYildirim Před 2 lety

    Thank you soo much!!🙏🏼

  • @karek9593
    @karek9593 Před 2 lety

    you solved my code problem by uploading this short video just great 😎

  • @coderxtech8591
    @coderxtech8591 Před 3 lety +2

    Bro😍😍😍😍 thnkyu so much

  • @daneshtolani6136
    @daneshtolani6136 Před rokem +1

    Great explaination, thanks 👍

  • @kiler62
    @kiler62 Před rokem

    Very heplful, thanks so much :)

  • @miiaameee8310
    @miiaameee8310 Před 5 měsíci

    thanksss, this help me a lot\

  • @adibpathan41833
    @adibpathan41833 Před rokem

    thank you so much 💟

  • @togrulmustafabayat
    @togrulmustafabayat Před 2 lety

    My Supreme Leader Thanks for all!

  • @sudiptamukherjee8216
    @sudiptamukherjee8216 Před rokem

    This video is really help me...

  • @iambrijeshtoo
    @iambrijeshtoo Před rokem

    Thank you ❤

  • @DuckpoolOfficial
    @DuckpoolOfficial Před 6 měsíci +1

    Thanks 😊😊

  • @pubglife3186
    @pubglife3186 Před 3 lety +3

    Thanks bro.... Bring some big project

  • @redheadrusskie
    @redheadrusskie Před 2 lety

    Thanks!!

  • @Pareshbpatel
    @Pareshbpatel Před 2 lety

    Nice tutorial on the basics of Events in JavaScript. Thanks, Dom
    {2021-08-17}

  • @user-jr5tz2hc4f
    @user-jr5tz2hc4f Před rokem

    thank you!

  • @sereneflatun
    @sereneflatun Před 14 dny

    Thank you so much 🎉

  • @jibonislamgame
    @jibonislamgame Před rokem

    Helpful

  • @EnzoAuditore
    @EnzoAuditore Před rokem

    thanks mate

  • @parmesanogood4393
    @parmesanogood4393 Před 2 lety +2

    I'm spanish speaking, but i understood almost all you said.

  • @K.Huynh.
    @K.Huynh. Před 2 lety

    thank you

  • @nostalgic6979
    @nostalgic6979 Před 3 lety +1

    Man you're awesome

  • @erfelipe
    @erfelipe Před 3 lety

    Thanks

  • @ALBDev
    @ALBDev Před 3 lety +1

    Came here to tell you that you added an extra round bracket to the function in the thumbnail 😂😂😂. Nice tutorial btw.

    • @dcode-software
      @dcode-software  Před 3 lety +2

      🤣🤣 oh no.. probably going to leave it

    • @gmangsxr750
      @gmangsxr750 Před 3 lety

      At the opening of the video you can see where it came from. It’s a cropped image of the adding of an event listener. The opening parentheses just got cropped out

    • @ALBDev
      @ALBDev Před 3 lety

      @@gmangsxr750 nice observation

  • @valdemaraspetrutis6237

    Brilliant

  • @hwanhoonkim5576
    @hwanhoonkim5576 Před rokem

    Cool theme, can I know the name of the theme please?

  • @georgegeorgio70
    @georgegeorgio70 Před 2 lety

    I get a pointerEvent instead of mouseEvent is that wrong?

  • @jrupp2823
    @jrupp2823 Před 3 lety

    i love you

  • @rsayhii
    @rsayhii Před 4 měsíci

    What is the name of theme?

  • @abc-hl1pw
    @abc-hl1pw Před 2 lety +1

    (e) contain informations about event

  • @lucifer-5ybtn
    @lucifer-5ybtn Před 3 lety

    which font?

  • @ClarkeDesign
    @ClarkeDesign Před 2 lety +1

    Would have been nice to explain too why "e". Can it be any other variable name, I assume that 'e' is used for simplicity, shorthand and laziness. but it could be "event", or "eventProperties" or "banana" - as the developer sees fit.

  • @ashishbhardwaj9390
    @ashishbhardwaj9390 Před 10 měsíci

    🐤🎉

  • @Krym
    @Krym Před 7 měsíci

    your a fuckin g bro

  • @MirzaMHalilovic
    @MirzaMHalilovic Před rokem

    0:23

  • @Konslufius
    @Konslufius Před 2 lety

    So to break it down for a stupid like me. Everything that is an event and is performed gets stored in a bundle of informations. In this case the e object.

  • @rymkheliancorporation9649

    is this deprecated?

  • @prodxtendo
    @prodxtendo Před 3 lety

    *e*

  • @netsaosa4973
    @netsaosa4973 Před rokem

    E

  • @dzaki4559
    @dzaki4559 Před 3 lety

    First

  • @AcarMurat
    @AcarMurat Před 4 měsíci

    Why don't everyone just explain things like this? Teachers make things so complicated for someone who is new to programming

  • @guyrowes1867
    @guyrowes1867 Před 3 lety +1

    Which clown thumbs downed the video

  • @wheeler553
    @wheeler553 Před 2 lety

    Kinda confusing video, the conditional statement if(e.ctrlKey) doesn't actually check if the ctrl key is being pressed down or not, just if that property exists at all with the event object, regardless of it's Boolean value.

  • @dennishofke
    @dennishofke Před 2 lety +1

    What an incredibly bad video. What you're explaining in this video is what's inside the parameter passed to the callback function you provide to an event listener. But in your title you say that this is always the case when you see (e) in some code. Even in this case it 'e' can be named no matter what, some people like to name it 'event' etc...

  • @TheMjukost
    @TheMjukost Před rokem

    Worst video ever. Logged e to the console and checked mdn docs. Damn, never would have thought of that.

  • @fragrantbloom
    @fragrantbloom Před 2 lety

    thank you!