{"ScriptPreparationCode":null,"TestCases":[{"Name":"Iterate all","Code":"\r\nconst a = [[1], [1,2,3], [1], [1,2,3], [1], [1,2,3]];\r\n\r\nconst b = [];\r\na.forEach((i) =\u003E {\r\n i.forEach((j) =\u003E {\r\n b.push(j);\r\n });\r\n});","IsDeferred":false},{"Name":"Clever iteration","Code":"const a = [[1], [1,2,3], [1], [1,2,3], [1], [1,2,3]];\r\n\r\nconst b = [];\r\na.forEach((i) =\u003E {\r\n if(i.length \u003E 1) {\r\n i.forEach((j) =\u003E {\r\n b.push(j);\r\n });\r\n } else {\r\n b.push(i[0]);\r\n }\r\n \r\n});","IsDeferred":false}]}