SHARE
TWEET

Untitled

a guest Jun 17th, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function removeZeros(nums) {
  2.  
  3.    for(let i = nums.length - 1; i >= 0 ; i--){
  4.     if(nums[i] === 0){
  5.       nums.splice(i, 1);
  6.       nums.push(0);
  7.     }
  8.    }
  9.    return nums;
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top