// 두 수 사이의 난수를 리턴하는 함수
function random(n1, n2){
return parseInt(Math.random()*(n2-n1+1)) + n1;
}
// 함수 응용 -> 5자리 인증번호 생성
let auth = "";
for(let i=0; i<5; i++){
auth += random(0, 9)
}
document.write("<h1>인증번호: " + auth + "</h1>");