here is my solution
function eliminateDuplicates(arr) {
var i,
len = arr.length,
out = [],
obj = {};
for (i = 0; i < len; i++) {
if (obj[arr[i]] != 0 && arr[i] != undefined)
obj[arr[i]] = 0;
else
delete obj[arr[i]];
}
for (i in obj) {
out.push(i);
}
return out;
}