JavaScript 循环语句
<!DOCTYPE html>
<html lang="en">
<html lang="en">
<head>
<meta charset="UTF-8">
<title>for与while循环</title>
</head>
<meta charset="UTF-8">
<title>for与while循环</title>
</head>
<body>
<script>
<script>
//for 循环
for (var a = 1; a <= 5; a++) {
for (var a = 1; a <= 5; a++) {
document.write(a, "<br/>")
}
}
//while 循环
var n = 1;
var n = 1;
while (n <= 5) {
document.write(n, "<br/>")
n++;
}
document.write(n, "<br/>")
n++;
}
</script>
</body>