LC 136. Single Number

/**
 * @param {number[]} nums
 * @return {number}
 */
var singleNumber = function(nums) {
  let ans = 0
  for (const num of nums) {
    ans ^= num
  }
  return ans
};
ๆฌข่ฟŽ้€š่ฟ‡ใ€Œ้‚ฎไปถใ€ๆˆ–่€…็‚นๅ‡ปใ€Œ่ฟ™้‡Œใ€ๅ‘Š่ฏ‰ๆˆ‘ไฝ ็š„ๆƒณๆณ•
Welcome to tell me your thoughts via "email" or click "here"