/** * @param {number[]} nums * @return {number} */ var singleNumber = function(nums) { let ans = 0; for(const num of nums) { ans ^= num; } return ans; }; console.log(singleNumber([3,2,2])) function arr(arrs){ for(const num of arrs){ console.log(num) } }