AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
# Do...While Loop The do...while statement creates a loop that executes a specified statement until the test condition evaluates to be false. The condition is evaluated after executing the statement. Syntax for do... while is ~~~ do{ // statement } while(expression) ; ~~~ Lets for example see how to print numbers less than 10 using `do...while` loop: ~~~ var i = 0; do { document.write(i + " "); i++; // incrementing i by 1 } while (i < 10); ~~~ > ***Note***: `i = i + 1` can be written `i++`. Exercise Using a do...while-loop, print numbers between less than 5. ~~~ var i = 0; ~~~