{"ScriptPreparationCode":"var list = [261,237,169,165,20,351,108,491,480,465,453,306,280,244,210,391,60,419,391,164,303,31,370,359,208,313,383,219,256,192,314,198,337,198,416,157,462,183,309,193,192,262,244,421,45,204,287,426,239,214];","TestCases":[{"Name":"Number 1: use for iterator","Code":"let largest = -1;\r\n\r\nfor (let i = 0; i \u003C list.length; i\u002B\u002B) {\r\n if (list[i] \u003E largest) {\r\n largest = list[i];\r\n }\r\n}","IsDeferred":false},{"Name":"Number 2: use for-of iterator","Code":"let largest = -1;\r\n\r\nfor (const item of list) {\r\n if (item \u003E largest) {\r\n largest = item;\r\n }\r\n}","IsDeferred":false},{"Name":"Number 3: use reduce","Code":"const largest = list.reduce((a,b) =\u003E Math.max(a, b));","IsDeferred":false},{"Name":"Number 3: Math.max with spread","Code":"const largest = Math.max(...list);","IsDeferred":false}]}