码迷,mamicode.com
首页 > 编程语言 > 详细

+JavaScript&jQuery.dowhile

时间:2018-07-03 14:48:33      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:string   ber   检查   line   rip   循环   key   print   ++   

dowhile


 

do ... while循环与while循环相似,只是条件检查发生在循环结束处。 这意味着即使条件为假,循环也将始终至少执行一次。

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>do while 循环</title>
</head>
<body>
<script>
    var i=0;
 
    do{
        println(i);
        i++;
    }while (i<10);
 
    function println(a) {
        document.write(a);
        document.write(‘<br>‘);
    }
 
</script>
</body>
</html>

 

+JavaScript&jQuery.dowhile

标签:string   ber   检查   line   rip   循环   key   print   ++   

原文地址:https://www.cnblogs.com/H97042/p/9257929.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!