let singleNumber = function(nums){
let map = {}
for(let i=0;i<nums.length-1;i++){
if(map[nums[i]]) map[nums[i]] = false;
else map[nums[i]] = true;
}
for(let [key, value] of Object.entries(map)){
if(value) return key;
}
return -1;
}