{"ScriptPreparationCode":"const nodeList = document.querySelectorAll(\u0027div\u0027);","TestCases":[{"Name":"Spread with map","Code":"const result = ([...nodeList]).map((node) =\u003E node.id);","IsDeferred":false},{"Name":"Array.from with map","Code":"const result = Array.from(nodeList).map((node) =\u003E node.id);","IsDeferred":false},{"Name":"Array.from with second parameter","Code":"const result = Array.from(nodeList, (node) =\u003E node.id);","IsDeferred":false},{"Name":"for loop push","Code":"const result = [];\r\nfor (let i = 0; i \u003C nodeList.length; i\u002B\u002B) {\r\n result.push(nodeList[i].id);\r\n}","IsDeferred":false},{"Name":"for loop pre-allocate","Code":"const result = new Array(nodeList.length);\r\nfor (let i = 0; i \u003C nodeList.length; i\u002B\u002B) {\r\n result[i] = nodeList[i].id;\r\n}","IsDeferred":false},{"Name":"for loop pre-allocate cached length","Code":"const length = nodeList.length;\r\nconst result = new Array(length);\r\nfor (let i = 0; i \u003C length; i\u002B\u002B) {\r\n result[i] = nodeList[i].id;\r\n}","IsDeferred":false}]}