Given an integer array nums of length n, you want to create an array ans of length 2n where ans[i] == nums[i] and ans[i + n] == nums[i] for 0 { nums.push(num) }) return nums }; Colored by Color Scripter cs 문제를 풀며 느낀 점 - 기존의 배열의 값을 유지하면서 복사해야 하기 때문에 forEach() 함수를 이용해서 nums를 순회하면서 값을 push()를 통해서 뒤에 붙여주는 식으로 해결했습니다.