///codewars : Moving Zeros To The End
function moveZeros(num) {
let length = num.length;
let x= num.filter((m)=>
m != 0 || !typeof m === "number" || typeof m === "boolean" || typeof m ==='object'|| typeof m ==='string' )
let n=length-x.length;
for(let i=0; i<n; i++){
x.push(0)
}
return x ;
}
function moveZeros(arr) {
let newArr = []
for (let i = 0; i < arr.length; i++) {
if (arr[i] !== 0) {
newArr.push(arr[i])
}
}
for (let i = 0; i < arr.length; i++) {
if (arr[i] === 0) {
newArr.push(arr[i])
}
}
return newArr