Seek and Destroy what's the problem?

What is the problem with my cycles?
Here is my code:

function destroyer(arr) {
// Remove all the values
var i;
var x;
function diferentes(val){
for(var z=0;z<arr[0].length;z++){
return val;

var sliced=arr.filter(diferentes);
if (arr[0][x]!==arr[i][x]){
return sliced;

destroyer([1, 2, 3, 1, 2, 3], 2, 3);

Array.prototype.filter() requires a callback function that returns a boolean value. Your diferentes function does not do that.