<!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>ex08반복문</title>
</head>
<body>
<script>
// 반복문
// 1. while
// : 반복횟수가 명확하지 않을 때 사용
// while(조건식){
// 반복할 구문
// }
// 2. do-while
// do{
// 반복할 구문
// }while(조건식)
// 3. for
// : 반복횟수가 명확할 때 많이 사용
// 1~5까지 콘솔창에 출력하는 코드를 작성
// for문의 초기화구문을 작성할 때 int가 아닌 var, let 키워드를 작성해야한다.
for(let i = 1; i<=5; i++){
console.log(i);
}
</script>
</body>
</html>