<script>
// 定义一个初始值
var n = 0;
// 条件判断
while(n < 3){
// 一段重复的代码
console.log("走一了一步路程");
// 改变初始值
n++;
}
// 后续代码
console.log("继续走下去");
</script>