{"ScriptPreparationCode":"const createNestedArray = (depth, width) =\u003E {\r\n let arr = [];\r\n for (let i = 0; i \u003C width; i\u002B\u002B) {\r\n arr.push(Array.from({ length: depth }, (_, j) =\u003E j));\r\n }\r\n return arr;\r\n};\r\n\r\nconst depth = 1000;\r\nconst width = 100;\r\nconst nestedArray = createNestedArray(depth, width);","TestCases":[{"Name":"flat()","Code":"nestedArray.flat();","IsDeferred":false},{"Name":"forEach()","Code":" const flattened = [];\r\nnestedArray.forEach(subArray =\u003E {\r\n flattened.push(...subArray);\r\n });","IsDeferred":false}]}