!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script>
var count = 5; //初始值
console.log("开始循环");
while (count >= 1) {
console.log("count :" + count);
document.write("count :" + count + "<br/>")
count--; // count = count -1; count: 4 , 3 2 1 0 改变循环条件语句
}
console.log("结束循环");
</script>
</head>
<body>
</body>
</html>
网友评论