Skip to content

Instantly share code, notes, and snippets.

@adnanrahic
Created May 3, 2017 08:28
Show Gist options
  • Save adnanrahic/9790ef246211a78d3dad9c2dbaa6b4d0 to your computer and use it in GitHub Desktop.
Save adnanrahic/9790ef246211a78d3dad9c2dbaa6b4d0 to your computer and use it in GitHub Desktop.
var moveZeros = function (arr) {
// move zeroes to end
}
console.log(moveZeros([0,1,0,2,0,1,0,1,0,3,0,1]));
console.log(moveZeros([0,0,null,1,0,'a',2,'e',0,1,0,false,1,{},0,3,[],'b',0,1]));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment