<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./script.js"></script>
</head>
<body>
<h1>Today dish wash</h1>
<button onclick="random()">뿅!!</button>
<h1 id="answer"></h1>
</body>
</html>
<script>
function random(){
let num = parseInt(Math.random(10)*10);
let answer = document.getElementById('answer');
answer.innerText='';
if(num%2===0){
answer.innerText='안성민!'
}else{
answer.innerText='박누리!'
}
}
</script>