Fix the function call flattenArray->steamrollArray (#36128)
Replace the function call in the Intermediate Code Solution from flattenArray to steamrollArray which is the actual function name.
This commit is contained in:
committed by
Randell Dawson
parent
dd74305cde
commit
78826ea90d
@ -82,7 +82,7 @@ You will definitely need recursion or another way to go beyond two level arrays
|
|||||||
return flat.some(Array.isArray) ? steamrollArray(flat) : flat;
|
return flat.some(Array.isArray) ? steamrollArray(flat) : flat;
|
||||||
}
|
}
|
||||||
|
|
||||||
flattenArray([1, [2], [3, [[4]]]]);
|
steamrollArray([1, [2], [3, [[4]]]]);
|
||||||
|
|
||||||
 <a href='https://repl.it/CLni/0' target='_blank' rel='nofollow'>Run Code</a>
|
 <a href='https://repl.it/CLni/0' target='_blank' rel='nofollow'>Run Code</a>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user