조건문이 똑똑한 작업을 처리했다면
반복문은>> 반복적인 작업을 통해 많은 일을 처리하는게 가능하게 해줌..
while(true/false){
}
true면 계속 반복되며, false가 올때 끝남
<!DOCTYPE html>
<html>
<head>
<meta charset=
"utf-8"
>
</head>
<body>
<h1>JavaScript</h1>
<ul>
<script>
i = 0;
while
(i < 10){
document.write(
"<li>hello world</li>"
);
i = i + 1;
}
</script>
</ul>
<h2>php</h2>
<ul>
<?php
$i
= 0;
while
(
$i
< 10){
echo
"<li>hello world</li>"
;
$i
=
$i
+ 1;
}
?>
</ul>
</body>
</html>