arguments to array;
Array.prototype.slice.call (arguments);
Calculates the factorial of an integer
function factorialize (num) { if(num==0)return 1; return num*factorialize (num-1);}
Remove the number specified in the array
function Destroyer (arr) { var args = array.from (arguments). Slice (1); return arr.filter (function(val) { return ! ) Args.includes (val); });} Deestroyer ([1,2,3,1,2,4,7,8,6],1,2,3);
Remove the object containing the second argument from the first argument
functionvar keys=Object.keys (source); return collection.filter (function(val) { return keys.every (function (key) { return val.hasownproperty (key) &&val[key]==Source[key]; }); null }, {first: ' Tybalt ', Last: ' Capulet '}], {last: "Capulet"});
Take a different part of two arrays
function diff (Arr1, arr2) { return arr1.filter (function(e) {return !arr2.includes (e) ;}). Concat (Arr2.filter (function(e) {return ! ) Arr1.includes (e);})); diff ([1, 2, 3, 5], [1, 2, 3, 4, 5]);
Freecodecamp Note--js