Event Handlers vs Event Listeners in JavaScript 👨‍💻💯

Поділитися
Вставка
  • Опубліковано 26 вер 2024

КОМЕНТАРІ • 53

  • @rocdiva530
    @rocdiva530 8 місяців тому +5

    I’m new to JavaScript and I kept hearing my teacher talk about event handler, event listener and I couldn’t decipher one from the other. This video is just what I needed. THANK YOU!

  • @Ifeomaa
    @Ifeomaa 9 місяців тому +4

    Short and straight to the point, learnt helpful tips

  • @Jaycoda10
    @Jaycoda10 Рік тому +9

    brilliant just what I was looking for, simple and straight to the point, boom!

  • @sahanatelasng8812
    @sahanatelasng8812 2 роки тому +1

    Really this video gave me a solution for my problem .... U are the best ... U solved it within few seconds .... In easy way..

  • @kaanergunlu7836
    @kaanergunlu7836 2 роки тому +4

    Well explained with clear examples, appreciated!

  • @darrienjohnson9053
    @darrienjohnson9053 2 роки тому +7

    Thanks. This was simple and easy to understand appreciate it bro

  • @edwinlimo5354
    @edwinlimo5354 Рік тому +1

    Great Patrick, your explanations are easy to understand

  • @bigshuff
    @bigshuff Рік тому +1

    Thank you for making this subject so easy to understand, I am so glad I persevered with my search and found you.

  • @essenzoffiziell8421
    @essenzoffiziell8421 11 місяців тому

    thank you for your video... God Bless You with The Best All Things

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

    thanks buddy. you really solved my confusion about event handler and listener.

  • @Prabh_cc
    @Prabh_cc 11 місяців тому

    Helpful content❤❤❤, I'm glad that you are doing something useful😊

  • @Zen-lz1hc
    @Zen-lz1hc 2 роки тому +1

    Like
    Thanks for the clear explication.

  • @marky1756
    @marky1756 2 роки тому +1

    Now I understand. Thanks a lot.👍

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

    Brilliant explanation. Thank you bro

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

    Bro thank you for this video, perfect explanation

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

    Great video! Solved my doubt of 2hrs research. Kudos!

  • @sunyfilip
    @sunyfilip 11 місяців тому +6

    But you need to be careful if you are assigning those listeners dynamically....if you for example open dialog with that element again and you are assigning those listeners again, you will have all your listeners runned multiple times, so don't forget to remove listeners before taking your element away :)

  • @saravananarumugam1702
    @saravananarumugam1702 4 місяці тому

    Thanks for explaining ❤

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

    thx. that was pretty easy to understand

  • @offgridvince
    @offgridvince Рік тому +1

    Thanks

  • @ScottIngram
    @ScottIngram 11 місяців тому

    Thank you. Very clear.

  • @GLHD-tl2hl
    @GLHD-tl2hl 5 місяців тому +1

    mind asking what font is this??... Too cool

  • @yuriinadilnyi3029
    @yuriinadilnyi3029 Рік тому +1

    I'd like to add that using EventListener allows you to add additional options if it's needed, cuz Im not sure if handlers do the same staff

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

    keep up the great work

  • @yabool2001
    @yabool2001 9 місяців тому

    Nice job.

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

    Great video, at work i hear these terms all the time but didn't get them initially

  • @user-ig1tf5bx2e
    @user-ig1tf5bx2e 2 роки тому +1

    Thank you

  • @JoanManuelSB
    @JoanManuelSB 11 місяців тому

    nice

  • @miss_kolissa
    @miss_kolissa 9 місяців тому

    How do you click once & comment 3 different lines at the same time? I'm also just learning a lot of shortcuts in the IDE

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

    Thanks for the awesome content, which theme are you using for your VSCODE bro

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

    Thank you!!

  • @Escko
    @Escko 11 місяців тому

    thank you

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

    can you please make video about difference between let,const and various and when to use them?

  • @therealspaceman3447
    @therealspaceman3447 Рік тому +1

    This was a very useful video for me. I had previously wrapped button and such with divs to support two events at once. No more. Thank you.

  • @jackmandu
    @jackmandu 2 роки тому +2

    Is there a preference of which to use if you need to have multiple objects all call the same function? For example I need to have several form fields concatenated into a single field.
    Also, is there anything special that needs to be done with addEventListener depending on the type of input field, such as radio button vs. text vs. select field?

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

      The solution I used was to use the generally least preferred option, which is in-line HTML event handler where you can have multiple functions separated by semi-colons, such as onchange=“func1();func2()”.

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

    thank you very much

  • @divedelhassnaoui7570
    @divedelhassnaoui7570 22 дні тому

    believe or not my teacher has no idea about Event Handlers

  • @AnilKumar-jx1hk
    @AnilKumar-jx1hk Рік тому

    nice moustache btw

  • @ravisankar9122
    @ravisankar9122 5 місяців тому

    I love you

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

    thanks

  • @محمّد.09
    @محمّد.09 7 місяців тому

    why no one is appreciating his typing sound?

  • @akashanand2656
    @akashanand2656 10 місяців тому

    What if I use handler and listener at the same time?

  • @nitkarshchourasia2406
    @nitkarshchourasia2406 5 місяців тому

    🎯 Key Takeaways for quick navigation:
    00:00 *🎶 Introduction to Event Handling in JavaScript*
    - Understanding the difference between event handlers and event listeners in JavaScript.
    - Overview of handling events using event handlers and event listeners.
    00:30 *🖱️ Event Handlers in JavaScript*
    - Event handlers are properties of objects used to handle events.
    - Demonstrating event handling with an example of using the `onclick` event handler.
    - Limitation of event handlers: only one event handler for a specific event type.
    01:51 *🔊 Event Listeners in JavaScript*
    - Event listeners are assigned to objects to listen for events and execute code accordingly.
    - Example of using the `addEventListener` method to handle click events.
    - Advantage of event listeners: ability to add multiple listeners for the same event.
    03:41 *🔃 Comparison: Event Handlers vs. Event Listeners*
    - Experimenting with adding multiple event handlers and event listeners to understand their behavior.
    - Demonstration of the difference in behavior when adding multiple handlers/listeners.
    - General advice: prefer event listeners over event handlers for flexibility and scalability.
    Made with HARPA AI

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

    Impress why code typing

  • @oleksandrdemchenko482
    @oleksandrdemchenko482 5 місяців тому

    +

  • @capslock3250
    @capslock3250 11 місяців тому

    Thanks

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

    thank you ..this is the best explanation about difference between handler and listener. .I was confused about them very much. ....Subscribed 👍

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

    Thanks. Its very clear now.

  • @Anas-ri4vv
    @Anas-ri4vv Рік тому

    Thank you

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

    Super bro

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

    เทพจัดพี่