This is going to be a multi-part Video + article tutorial series on JavaScript DOM. You're reading Part 6
You can read Part 5 here:
...
For further actions, you may consider blocking this person and/or reporting abuse
Looking forward for the Query Selectors 😊 Subscribed to the YouTube Channel 👍
yep same here
Thank you
yeah
Thank you Venkat
Thanks!
Nice article! Just thought I'd add to the iteration bit:
Any DOM selector that returns mutlple objects (
getElementsByTagName
,getElementsByClassName
ect) return a HTMLCollection object, which is different from an array, lacking all of the useful prototype functions likeforEach
which would make iteration easier and cleaner as opposed to a for loop.To get around this, I like to use the ES6 spread operator on the result of the DOM function, effectively 'converting' it into a normal JS array, allowing me to operate and iterate over it as usual! See below for an example!
That's a beauty! Thanks for contributing 🙂
Good article. Subscribed to the YouTube Channel
Glad it helped 😊
good one
Thank you
I have so been looking for information on these topics, as a newbie, I like the how’s and why’s of the DOM construct! Looking forward to more!
Yep that's very exciting! Glad to help 🙂 If you would like video content on these , you can check them out on the YouTube channel : youtube.com/c/developerTharun