代码示例:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <script> var a=1 var n=1 while(a<=10){ n = n*a a++ } console.log(n) do { var b= prompt("你爱不爱我") }while(b !== "yes") alert("我也爱你") </script> </body> </html>
标签:do,示例,代码,while,循环,var From: https://www.cnblogs.com/xu529/p/16997433.html