<풀이 코드>
const planet = ["수성","금성","지구","화성","목성","토성","천왕성","해왕성"]; var num = prompt(); console.log(planet[num-1]);