do{}while() 循环
do{}while() 循环至少会循环一次:
语法如下:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>DEMO - Lik</title> </head> <body> <script> var a = 0; do{ a++; console.log(a); }while(a<5); </script> </body> </html>
控制台会输出:
author:Lik
Endeavoring to powerless, struggling to move yourself.
Endeavoring to powerless, struggling to move yourself.