0
Why el[0] ???? Can't we do it el.href....?
2 Answers
+ 2
Hi!
If you refers to the example in the JavaScript course is because the use of getElementByTagName () method, this mehod returns all of the elements of the specified tag name as an ARRAY. So, with brackets [] is the correct way to access array elements
0
thanks bro !