Array.prototype.unused = function(arr){ var digital = this.join(); return arr.filter(function(value){ return digital.indexOf(value) === -1; }); }; alert([32, 90, 44].unused([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]));