⊗jsSpPATp 49 of 294 menu

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:

let elems = document.querySelectorAll('p'); console.log(elems); // NodeList

And in the next example we will get a collection of another type:

let elems = document.getElementsByTagName('p'); console.log(elems); // HTMLCollection

Check what type of collection will be in the childNodes property.

Check what type of collection will be in the children property.

Check what type of collection will be obtained with the getElementsByClassName method.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline