HTMLCollection vs. NodeList Explained!
ฝัง
- เผยแพร่เมื่อ 6 ก.ย. 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! :-)
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!
thank for your useful video. Could you give us some examples when should use both?
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 :)
Was getting confused how nodeList was being accessed with index and forEach. Cleared me up. Thanks!
Glad to hear. Thanks for watching Utsav!
Excellent explanation. Put me on the right road.
Awesome!
Thanks for the explanation, it's been very helpful!
Glad it was helpful!
Man seriously, you saved my life! Thanks alot!
Cool, thanks Aryo!
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 😀
Super clear and precise
Glad you liked it
man, you deserve heart and support i love your explanation brooo thanks !
I appreciate that!
Thanks I'm from Argentina and I understood
Great to hear!
completely helpful. Thank you for such a self-explanatory content.
Glad it was helpful!
A very Nice and Helpful Video👍👍
Thanks, glad it helped!
Thanks man it helped me to understand pros and cons
Great, glad to hear!
Thank you for explaining it so clearly. Subscribed!
Thanks for watching JK!
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!
Thanks Sir... What needed
Glad to hear!
this video is completely helpful. now I can understand the difference, keep going to do more videos❤
Thank you! Will do!
Thank you so much i loved your teaching 🙏🏻
So glad!
nice illustrated recap 👍
Thanks Antonio!
very helpful! thank you for your explanation
Glad it was helpful!
Best video on the topic I've ever see
Great to hear, thanks for watching!
Very useful video. Thank you
Glad it was helpful!
awesome video! very informative . Easy to follow example to demonstrate a confusing topic. Well done!
Thanks Andrew, glad to hear!
Thank u man .. You are a life saver
Awesome! Thanks for watching!
Late to the party but thanks for the excellent explanation
Excellent, thanks for watching!
Great Video. It helped me a lot.
Glad to hear it!
Very helpful thanks!
Glad to hear, thanks Michal!
Very useful!
Glad to hear that!
This video was great
Thanks for watching!
Thank you . I am grateful for your help.
grateful for such a clear explanation, like+sub
Thanks for the sub. Glad it helped!
Good job, everything is clear. I like your channel, there are a lot of useful videos! thx
Excellent, glad to hear!
Great thanks!
Thanks for watching Natasha!
good video
Thank you!
🗣JOIN the Code Creative Facebook group! :
facebook.com/groups/1612600368887577
great video
Glad you enjoyed it
fantastico!
Thank you!
Thank you so much for this video, god bless you sir
Thanks for watching Cesar!
Thank you
Thanks for watching!
📖 Download my FREE "Google Search Secrets for Developers" Cheat Sheet:
store.thecodecreative.com/google-secrets-cheat-sheet
which skin of vsc?
That's "Shades of Purple"
To subscribe to the channel: th-cam.com/channels/mOpHGj4JRWCdXhllVTZCVw.html
❤️❤️❤️👍👍👍thank you
You're welcome, thanks for watching!
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!