인프런 커뮤니티 질문&답변
영상 보기전에 미리 한번 해봤습니다.
해결된 질문
작성
·
163
2
var x = Math.floor(Math.random() * 9) + 1;
var y = Math.floor(Math.random() * 9) + 1;
var q = x * y;
console.log(x + "*" + y);
while (true) {
var a = prompt(x +"*" +y);
if (Number(a) === q) {
console.log(Number(a));
alert("딩동댕");
break;
}
else {
alert("공부해라!");
}
}





