<html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, > <title>Document</title> </head> <body> <script> While (n<11){console.log(study hard); If (n==11){break; } // change the variable n++; } </script> </body> </html> <! For loop must be a known degree, while can be used for loop of unknown degree.Copy the code