폰켓몬
function solution(nums) { var answer = 0; var chance = nums.length / 2; var set = new Set(nums); var unique = [...set]; answer = unique.length < chance ? unique.length : chance; return answer; }