SHARE
TWEET

Untitled

a guest Jan 14th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. function destroyer(arr) {
  3.   // Remove all the values
  4.   var fin = [];
  5.   var args = Array.prototype.slice.call(arguments);
  6.   args.shift();
  7.   for (var i = 0; i < arr.length; i++) {
  8.     console.log(i);
  9.     if (args.includes(arr[i])) {
  10.      
  11.     } else {
  12.       fin.push(arr[i]);
  13.     }
  14.   }
  15.   return fin;
  16. }
  17.  
  18. destroyer([1, 2, 3, 1, 2, 3], 2, 3);
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