```
/**
* @param {number[]} nums
* @return {number[]}
*/
var singleNumber = function(nums) {
var number = {};
for(var i=0;i<nums.length;i++) {
var key = nums[i].toString();
if(number.hasOwnProperty(key)) {
delete number[key];
} else {
number[key] = true;
}
}
var result = Object.getOwnPropertyNames(number);
result[0] = Number(result[0]);
result[1] = Number(result[1]);
return result;
};
```