{"ScriptPreparationCode":"var arr = [];\r\n\r\nfor(var i = 0; i\u003C1000*1000;i\u002B\u002B){arr.push(Math.random());}\r\n\r\nfunction sumFor(arr){\r\n \tlet sum = 0;\r\n\tfor(var i = 0;i\u003Carr.length;i\u002B\u002B){\r\n\t\tsum \u002B= arr[i];\r\n\t}\r\n return sum;\r\n}\r\n\r\nfunction sumReduce(arr){\r\n\treturn arr.reduce((a,b)=\u003Ea\u002Bb,0);\r\n}","TestCases":[{"Name":"Sum with for","Code":"var x = sumFor(arr);","IsDeferred":false},{"Name":"Sum with Reduce","Code":"var y = sumReduce(arr);","IsDeferred":false}]}