{"ScriptPreparationCode":"var max = null;\r\nvar arr = [1,3,45,7,546,56,564,454,3,2,4,6,6,7,2,46,88,32];","TestCases":[{"Name":"for of","Code":"for(const el of arr){\r\n if (max === null) {\r\n max = el;\r\n } else {\r\n max \u003C el \u0026\u0026 (max = el);\r\n }\r\n}\r\nconsole.log(\u0027forred\u0027, max);","IsDeferred":false},{"Name":"map","Code":"arr.map(el =\u003E { \r\n if (max === null) {\r\n max = el;\r\n } else {\r\n max \u003C el \u0026\u0026 (max = el);\r\n }\r\n})\r\nconsole.log(\u0027maped\u0027, max);","IsDeferred":false},{"Name":"reduce","Code":"max = arr.reduce((acc, val) =\u003E { \r\n if (acc === null) {\r\n acc = val;\r\n } else {\r\n acc \u003C val \u0026\u0026 (acc = val);\r\n }\r\n \r\n return acc;\r\n}, max);\r\nconsole.log(\u0027reduced\u0027, max);","IsDeferred":false},{"Name":"forEach","Code":"arr.forEach(el =\u003E { \r\n if (max === null) {\r\n max = el;\r\n } else {\r\n max \u003C el \u0026\u0026 (max = el);\r\n }\r\n})\r\nconsole.log(\u0027forEached\u0027, max);","IsDeferred":false}]}