语法:
for(初始化表达式;条件表达式;更新表达式;)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script>
//while循环
// var n = 1;
// while(n <= 10){
// alert(n++);
// }
//for循环
for(var n = 1 ; n < 10 ; n++){
alert(n);
}
</script>
</head>
<body>
</body>
</html>