{"ScriptPreparationCode":null,"TestCases":[{"Name":"reduce \u002B Array.prototype.concat","Code":"var params = [[ 1, 2 ], [ \u0022hello\u0022, true, 7 ]];\r\nvar other = params.reduce((acc, val) =\u003E acc.concat(val), []);","IsDeferred":false},{"Name":"Array.prototype.flat","Code":"var params = [[1, 2, params], [ \u0022hello\u0022, true, 7 ]];\r\nvar other = params.flat(1);","IsDeferred":false},{"Name":"Custom flat","Code":"const flat = (array, depth) =\u003E ((Number(depth) \u003E 1) ?\r\n array.flat(depth) :\r\n array.reduce((a, v) =\u003E a.concat(v), []));\r\nvar params = [[1, 2, params], [ \u0022hello\u0022, true, 7 ]];\r\nvar other = flat(params);","IsDeferred":false}]}