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

답안

let a = prompt('10진수를 입력해주세요.') let b = []; let result = ''; while (a){ b.push(a % 2); a = parseInt(a / 2, 10); } b.reverse(); b.forEach((n) => { result += n; }) console.log(result);