/*var lotto = [];
lotto.push(parseInt(Math.random() * 45 + 1));
lotto.push(parseInt(Math.random() * 45 + 1));
lotto.push(parseInt(Math.random() * 45 + 1));
lotto.push(parseInt(Math.random() * 45 + 1));
lotto.push(parseInt(Math.random() * 45 + 1));
lotto.push(parseInt(Math.random() * 45 + 1));
document.write(lotto);
for (시작; 끝; 증가) {
반복할문장
}
예시
for (var i = 0; i < 6; i++){
document.write(i);
}
var lotto = [];
for (var i = 0; i < 6; i++) {
lotto.push(parseInt(Math.random() * 45 + 1));
}
document.write(lotto);