HTMLCollection vs. NodeList Explained!

Поделиться
HTML-код
  • Опубликовано: 1 июн 2020
  • An exploration and comparison of HTMLCollections and NodeLists. HTMLCollections and NodeLists are different types of collections that contain DOM elements or nodes. An HTMLCollection or NodeList is what gets returned when we use various JavaScript selector methods like getElementsByTagName, getElementsByClassName, querySelectorAll, etc. By understanding the differences between HTMLCollections and NodeLists we can better decide which selector methods to use. Created by Gregg Fine.
    📖 Download my FREE "Google Search Secrets for Developers" Cheat Sheet:
    store.thecodec...
    🗣JOIN the Code Creative Facebook group! :
    / 1612600368887577
    🔴Subscribe for more free Code Creative videos: : / @thecodecreative
    🌐 The Code Creative Official Website
    www.thecodecre...
    🎓 The Code Creative Courses
    www.thecodecre...
    ✅ Recommended related videos:
    Debouncing Explained
    • Debouncing Explained |...
    Memoization Explained
    • JavaScript Memoization...
    Sorting in JavaScript Explained
    • JavaScript Comparator ...
    ✅ For business inquiries contact me at gregg@greggfinedev.com
    ✅ Let's connect:
    Twitter - @GreggFine
    Instagram - /greggfinedev
    Facebook - /hiddentigermusic
  • НаукаНаука

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

  • @fmri4301
    @fmri4301 4 года назад +7

    This is the first video of HTMLCollection vs nodeList which was actually useful. Although the the implementation of Live vs Static is still weird for me... I mean static collection still update the DOM ...

    • @TheCodeCreative
      @TheCodeCreative  4 года назад

      Hi fMRI, glad it was useful! Let me know what was confusing to you about Live vs. Static. Can you give an example of a static collection updating the DOM?

    • @fmri4301
      @fmri4301 4 года назад +1

      @@TheCodeCreative Actually all was very clear. However, a lot of articles tell you HTMLCollection = Live and NodeList = Static, which is true in most cases but then there is .childNodes which is a NodeList but also Live...

    • @TheCodeCreative
      @TheCodeCreative  4 года назад

      @@fmri4301 ah, I see what you're saying. Yes, that definitely is confusing to remember! :-)

  • @mahaan6218
    @mahaan6218 4 года назад +5

    Wow! Best video on the topic I've ever seen. Please continue uploading more vids like this one. We love to see them. Liked and Subbed :P

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

    Man you saved me from a mental breakdown, I was so confused as to why I couldn't apply array methods using querySelector
    Thank you very much, it clarifies a lot about how to select the elements from the DOM!

  • @drkunivrs
    @drkunivrs Месяц назад +1

    Thanks for the explanation, it's been very helpful!

  • @Utsavojha2
    @Utsavojha2 3 года назад +2

    Was getting confused how nodeList was being accessed with index and forEach. Cleared me up. Thanks!

  • @anlai4586
    @anlai4586 2 года назад +6

    thank for your useful video. Could you give us some examples when should use both?

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

    Excellent explanation. Put me on the right road.

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

    Super clear and precise

  • @aryomuhammad8254
    @aryomuhammad8254 2 года назад +2

    Man seriously, you saved my life! Thanks alot!

  • @jkwarren375
    @jkwarren375 3 года назад +3

    Thank you for explaining it so clearly. Subscribed!

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

    man, you deserve heart and support i love your explanation brooo thanks !

  • @damilolaoladele9670
    @damilolaoladele9670 2 года назад +2

    completely helpful. Thank you for such a self-explanatory content.

  • @samadkhan-ch1bx
    @samadkhan-ch1bx 2 года назад +1

    A very Nice and Helpful Video👍👍

  • @mguimenez
    @mguimenez 3 года назад +1

    Thanks I'm from Argentina and I understood

  • @abrarmansouri2746
    @abrarmansouri2746 3 года назад +1

    Thank you. 🙏And for listing the other node type! I was a bit confused but not after watching this.

  • @tommynotts1400
    @tommynotts1400 4 года назад +2

    Excellent! I'm going to watch all of your videos.

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

    Thanks man it helped me to understand pros and cons

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

    Thank you so much i loved your teaching 🙏🏻

  • @andrewgarfinkel1978
    @andrewgarfinkel1978 3 года назад +1

    awesome video! very informative . Easy to follow example to demonstrate a confusing topic. Well done!

  • @user-ux6wg8ch7w
    @user-ux6wg8ch7w Год назад +1

    this video is completely helpful. now I can understand the difference, keep going to do more videos❤

  • @jeromebranchetti6002
    @jeromebranchetti6002 2 года назад +2

    Thanks Sir... What needed

  • @muhammadilhamrobani7042
    @muhammadilhamrobani7042 2 года назад +1

    very helpful! thank you for your explanation

  • @oleksiipetrenko3824
    @oleksiipetrenko3824 3 года назад +1

    Best video on the topic I've ever see

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

    well explained. thank you!🙏

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

    Very useful video. Thank you

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

    Great Video. It helped me a lot.

  • @gilbertocarvalho7088
    @gilbertocarvalho7088 2 года назад

    Thank you . I am grateful for your help.

  • @antoniomemo636
    @antoniomemo636 2 года назад +1

    nice illustrated recap 👍

  • @rahulbind6986
    @rahulbind6986 2 года назад +1

    Thank u man .. You are a life saver

  • @michamarkiewicz5355
    @michamarkiewicz5355 2 года назад +1

    Very helpful thanks!

  • @vitaliimohylnyi9967
    @vitaliimohylnyi9967 3 года назад +1

    Good job, everything is clear. I like your channel, there are a lot of useful videos! thx

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

    Thanks sir
    Just wanted to point out that in array.from the second arguement is the map method so you didnt need to explicitly use the map

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

      That's really cool! I'm gonna use that all the time now 😀

  • @juanguirao
    @juanguirao 2 года назад +1

    Very useful!

  • @Knards
    @Knards 3 года назад +1

    Late to the party but thanks for the excellent explanation

  • @aronreis
    @aronreis 3 года назад +1

    This video was great

  • @cesarpintos8418
    @cesarpintos8418 3 года назад +1

    Thank you so much for this video, god bless you sir

  • @user-cu8pf3yp4e
    @user-cu8pf3yp4e 2 года назад +1

    grateful for such a clear explanation, like+sub

  • @natashasimone1931
    @natashasimone1931 3 года назад +1

    Great thanks!

  • @Webbi_Trax
    @Webbi_Trax 2 года назад +1

    great video

  • @hardtruthes
    @hardtruthes 3 года назад +2

    good video

  • @robertobenedit
    @robertobenedit 2 года назад +2

    fantastico!

  • @KevinMaximus
    @KevinMaximus 2 года назад +1

    Thank you

  • @lenhu7089
    @lenhu7089 4 года назад +1

    ❤️❤️❤️👍👍👍thank you

  • @TheCodeCreative
    @TheCodeCreative  3 года назад

    🗣JOIN the Code Creative Facebook group! :
    facebook.com/groups/1612600368887577

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

    which skin of vsc?

  • @TheCodeCreative
    @TheCodeCreative  2 года назад

    📖 Download my FREE "Google Search Secrets for Developers" Cheat Sheet:
    store.thecodecreative.com/google-secrets-cheat-sheet

  • @ramidaoud3776
    @ramidaoud3776 2 года назад +1

    I have a feeling that you edited this video on a linux box

  • @TheCodeCreative
    @TheCodeCreative  4 года назад

    To subscribe to the channel: ruclips.net/channel/UCmOpHGj4JRWCdXhllVTZCVw

  • @AhmedIbrahim-fi2so
    @AhmedIbrahim-fi2so 2 года назад

    dud that is so confusing 😩😩😩

    • @TheCodeCreative
      @TheCodeCreative  2 года назад

      Is there anything in particular that you found confusing?