I read the document and did not fully understand the advantage of using NodeList.
Since it is like an array (I knew that it was not an array), what are the advantages of using a NodeList?
NodeList is actually not a javascript construct for vanilla, as it is part of the DOM API. Just as the ecma specification will not include types such as [HtmlElement], it also does not mention NodeList.
Where you will find it in the World Wide Web Consortium (W3C) docs for the DOM api.
open NodeList interface
NodeList , . NodeList DOM .
( ) NodeList. , . , javascript.
NodeLists "" DOM. , - .
NodeList, DOM . DOM , , , Array ? DOM , . , DOM API, , . DOM - .
, , Array NodeList . .
Array.prototype.map.call(nodeList, function (a, index) { ... });
"" NodeLists , NodeList API, . , NodeList DOM, , .
: http://www.w3schools.com/dom/dom_nodelist.asp
NodeList:
NodeList
node . , node XML- .
Array .
Array
: http://toddmotto.com/a-comprehensive-dive-into-nodelists-arrays-converting-nodelists-and-understanding-the-dom/.
NodeLists, . , , Array NodeList.
Source: https://habr.com/ru/post/1526843/More articles:Инициализация переменной const с помощью ntohl() - cCentering and Cropping WPF Image Host - imageDatatables change html filter - javascriptHow can I call super () so that it is compatible in 2 and 3? - pythonMultiple Search Queries Using Ruby Searchkick - ruby | fooobar.comCreate a new Prestashop basket in custom php - phpPrestashop: add an individual product to the basket - phpEnd-to-end AngularJs testing using existing Selenium tests written in Java - javaTest.QuickCheck does not generate random values correctly - haskellHow to simulate a Snap.svg map in AngularJS? - javascriptAll Articles