{"ScriptPreparationCode":"var n = 1000\r\nvar arr = [...Array(n)];\r\n\r\nfunction flatMap(arr, fn) {\r\n const acc = [];\r\n for (let i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n acc.push(...fn(arr[i]));\r\n }\r\n return acc;\r\n}\r\nvar fn = (x,i) =\u003E [i \u002B 1, i \u002B 2]","TestCases":[{"Name":"flatmap","Code":"arr.flatMap(fn)","IsDeferred":false},{"Name":"for of","Code":"let res = [], i=0;\r\nfor(const i of arr) res.push(...[i \u002B 1, i \u002B 2]);","IsDeferred":false},{"Name":"custom flatMap","Code":"flatMap(arr, fn)","IsDeferred":false}]}