Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 283 Bytes

Moving Zeros To The End.md

File metadata and controls

7 lines (5 loc) · 283 Bytes

Write an algorithm that takes an array and moves all of the zeros to the end, preserving the order of the other elements.

moveZeros([false,1,0,1,2,0,1,3,"a"]) // returns[false,1,1,2,1,3,"a",0,0]

solution