JavaScript Loops
<!DOCTYPE html> <html> <body> <h2>A basic while loop</h2> <script> let count = 0; while (count < 3) { console.log("count is", count); count++; } // count is 0 // count is 1 // count is 2 </script> </body> </html>
<!DOCTYPE html> <html> <body> <h2>A basic while loop</h2> <script> let count = 0; while (count < 3) { console.log("count is", count); count++; } // count is 0 // count is 1 // count is 2 </script> </body> </html>