HTMLCollection vs. NodeList Explained!
Vložit
- čas přidán 7. 09. 2024
- 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
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 ...
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?
@@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...
@@fmri4301 ah, I see what you're saying. Yes, that definitely is confusing to remember! :-)
🗣JOIN the Code Creative Facebook group! :
facebook.com/groups/1612600368887577
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!
Awesome!
📖 Download my FREE "Google Search Secrets for Developers" Cheat Sheet:
store.thecodecreative.com/google-secrets-cheat-sheet
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
Thanks Mahaan, more vids coming soon!
agree :)
Excellent explanation. Put me on the right road.
Awesome!
Was getting confused how nodeList was being accessed with index and forEach. Cleared me up. Thanks!
Glad to hear. Thanks for watching Utsav!
thank for your useful video. Could you give us some examples when should use both?
Man seriously, you saved my life! Thanks alot!
Cool, thanks Aryo!
man, you deserve heart and support i love your explanation brooo thanks !
I appreciate that!
Thanks man it helped me to understand pros and cons
Great, glad to hear!
Thanks for the explanation, it's been very helpful!
Glad it was helpful!
Thanks I'm from Argentina and I understood
Great to hear!
Super clear and precise
Glad you liked it
completely helpful. Thank you for such a self-explanatory content.
Glad it was helpful!
Thank you. 🙏And for listing the other node type! I was a bit confused but not after watching this.
Glad it was helpful!
Excellent! I'm going to watch all of your videos.
Excellent!
Thank you for explaining it so clearly. Subscribed!
Thanks for watching JK!
A very Nice and Helpful Video👍👍
Thanks, glad it helped!
To subscribe to the channel: czcams.com/channels/mOpHGj4JRWCdXhllVTZCVw.html
this video is completely helpful. now I can understand the difference, keep going to do more videos❤
Thank you! Will do!
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
That's really cool! I'm gonna use that all the time now 😀
awesome video! very informative . Easy to follow example to demonstrate a confusing topic. Well done!
Thanks Andrew, glad to hear!
very helpful! thank you for your explanation
Glad it was helpful!
Thank you so much i loved your teaching 🙏🏻
So glad!
nice illustrated recap 👍
Thanks Antonio!
Best video on the topic I've ever see
Great to hear, thanks for watching!
Thanks Sir... What needed
Glad to hear!
Late to the party but thanks for the excellent explanation
Excellent, thanks for watching!
Very useful video. Thank you
Glad it was helpful!
Great Video. It helped me a lot.
Glad to hear it!
Thank you . I am grateful for your help.
Thank u man .. You are a life saver
Awesome! Thanks for watching!
Good job, everything is clear. I like your channel, there are a lot of useful videos! thx
Excellent, glad to hear!
Very helpful thanks!
Glad to hear, thanks Michal!
Very useful!
Glad to hear that!
This video was great
Thanks for watching!
grateful for such a clear explanation, like+sub
Thanks for the sub. Glad it helped!
good video
Thank you!
Thank you so much for this video, god bless you sir
Thanks for watching Cesar!
great video
Glad you enjoyed it
Great thanks!
Thanks for watching Natasha!
fantastico!
Thank you!
Thank you
Thanks for watching!
❤️❤️❤️👍👍👍thank you
You're welcome, thanks for watching!
which skin of vsc?
That's "Shades of Purple"
I have a feeling that you edited this video on a linux box
How so?
@@TheCodeCreative maybe the camera quality
@@ramidaoud3776 ahhh
dud that is so confusing 😩😩😩
Is there anything in particular that you found confusing?
well explained. thank you!🙏
Glad it was helpful!