Следите за новинками
в нашем Telegram канале. Жми, чтобы подписаться:)
⊗jstsPmIbCl 39 of 55 menu
◀ ▶

Collections in TypeScript

TypeScript also has the ability to work with collections of DOM elements. Let's look at them using the following example. Let's say we have several div tags:

<div></div> <div></div> <div></div>

Let's write a collection of these DOM elements into a variable:

let lst: NodeList = document.querySelectorAll('div');

Make a variable that will contain the Map collection.

Make a variable that will contain the Set collection.

Make a variable that will contain the NodeList collection.

Make a variable that will contain the HTMLCollection collection.

← →
↑
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