SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function filterArray(arr) {
  2.   let newArr = arr.filter(function (x) {
  3.     if((typeof(x) === 'number') && (x !== 0)) {
  4.       return x;
  5.     }
  6.   });
  7.   return newArr;
  8. }
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
 
Top