{"ScriptPreparationCode":"var arr = [];\r\n\r\nfor( var cpt = 0; cpt \u003C 1000; cpt\u002B\u002B ) {\r\n arr.push( Math.random() );\r\n}\r\n\r\nvar someFn = function( item ) {\r\n return item * 3 \u002B item / 5;\r\n}","TestCases":[{"Name":"Simple for loop - Access index and value","Code":"let total = 0;\r\nfor( var i = 0, n = arr.length; i \u003C n; i\u002B\u002B ) {\r\n total \u002B= i \u002B arr[i];\r\n}","IsDeferred":false},{"Name":"Array.forEach - Access index and value","Code":"let total = 0;\r\narr.forEach((value, i) =\u003E {\r\n total \u002B= i \u002B value;\r\n});","IsDeferred":false},{"Name":"for-of \u002B Array.entries","Code":"let total = 0;\r\nfor(const [i, value] of arr.entries()) {\r\n total \u002B= i \u002B value;\r\n}","IsDeferred":false},{"Name":"for-of - Access value only","Code":"let total = 0;\r\nfor(const value of arr) {\r\n total \u002B= value;\r\n}","IsDeferred":false},{"Name":"Simple for loop - Access value only","Code":"let total = 0;\r\nfor( var i = 0, n = arr.length; i \u003C n; i\u002B\u002B ) {\r\n total \u002B= arr[i];\r\n}","IsDeferred":false},{"Name":"Array.forEach - Access value only","Code":"let total = 0;\r\narr.forEach((value) =\u003E {\r\n total \u002B= value;\r\n});","IsDeferred":false}]}