Skip to content

Commit f32adac

Browse files
committed
Fixed #Q14 nested array flattening
1 parent 0476359 commit f32adac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

challenges/collections-challenges.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ function flat(arr){
344344
const flatArr = [];
345345
arr.forEach((value) => {
346346
if(Array.isArray(value)){
347-
flat(value);
347+
flatArr.push(...flat(value));
348348
}
349349
else{
350350
flatArr.push(value);

0 commit comments

Comments
 (0)