{"ScriptPreparationCode":" var arr = [];\r\n for (var i = 0; i \u003C 1000; i\u002B\u002B) {\r\n arr[i] = i;\r\n }\r\n\r\n function someFn(ix) {\r\n return ix * 5 \u002B 1 / 3 * 8;\r\n }","TestCases":[{"Name":"For loop, basic","Code":"for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n someFn(arr[i]);\r\n}","IsDeferred":false},{"Name":"While loop, basic","Code":"var i = 0;\r\nwhile (i \u003C arr.length) {\r\n someFn(arr[i]);\r\n i\u002B\u002B;\r\n}","IsDeferred":false},{"Name":"For loop, cached (inside for statement)","Code":"for (var i = 0, len = arr.length; i \u003C len; i\u002B\u002B) {\r\n someFn(arr[i]);\r\n}","IsDeferred":false},{"Name":"For loop, cached (outside for statement)","Code":"var len = arr.length;\r\nfor (var i = 0; i \u003C len; i\u002B\u002B) {\r\n someFn(arr[i]);\r\n}","IsDeferred":false},{"Name":"For loop, i-- (caching inside for loop)","Code":"for (var i = arr.length; i \u003E 0; i--) {\r\n someFn(arr[i]);\r\n}","IsDeferred":false},{"Name":"For loop, i-- (caching outside for loop)","Code":"var i = arr.length;\r\nfor (; i--;) {\r\n someFn(arr[i]);\r\n}","IsDeferred":false},{"Name":"While loop, cached","Code":"var len = arr.length;\r\nvar i = 0;\r\nwhile(i \u003C len){\r\n someFn(arr[i]);\r\n i\u002B\u002B;\r\n}","IsDeferred":false},{"Name":"While loop, i--","Code":"var i = arr.length;\r\nwhile(i--){\r\n someFn(arr[i]);\r\n}","IsDeferred":false}]}