Skip to content

Commit

Permalink
Fixed #Q14 nested array flattening
Browse files Browse the repository at this point in the history
  • Loading branch information
ayush013 committed Jun 23, 2021
1 parent 0476359 commit f32adac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion challenges/collections-challenges.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ function flat(arr){
const flatArr = [];
arr.forEach((value) => {
if(Array.isArray(value)){
flat(value);
flatArr.push(...flat(value));
}
else{
flatArr.push(value);
Expand Down

0 comments on commit f32adac

Please sign in to comment.