HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
📝
프론트엔드 스쿨 교안(1기)
/
📝
(코테준비) 자료구조 및 알고리즘
/
☝
JS 100제 - 1권
/
🔥
문제42
/
✔️
답안
✔️

답안

const month = prompt('월을 입력하세요.'); const date = prompt('일을 입력하세요.'); function solution(a,b){ const day = ["SUN","MON","TUE","WED","THU","FRI","SAT"]; const x = new Date('2020-'+a+'-'+b); return day[x.getDay()]; } console.log(solution(month, date));