Pseudo-arrays types in JavaScript
Pseudo-arrays come in various types. The type depends on the method of obtaining.
In the following example, we will get a collection of one type:
javascriptlet elems = document.querySelectorAll('p');
console.log(elems); // NodeList
And in the next example we will get a collection of another type:
javascriptlet elems = document.getElementsByTagName('p');
console.log(elems); // HTMLCollection
Задание 1
Check what type of collection will be in the
childNodes
property.
Задание 2
Check what type of collection will be in the
children
property.
Задание 3
Check what type of collection will be obtained with the
getElementsByClassName method.