Advertisement
jverce

Untitled

Aug 17th, 2020
2,154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const moveZeros = arr => {
  2.   const nonZero = arr.filter(i => i != 0);
  3.   const zero = arr.filter(i => i == 0);
  4.   return [...nonZero, ...zero];
  5. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement