do-while-2

 

Example of JavaScript do-while loop:

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <script> var i = 10; do { document.write(i + " "); i++; } while (i < 10); </script> </body> </html>
Output