JavaScript Loops
<!DOCTYPE html> <html> <body> <h2>Counting from 0 to 4</h2> <script> for (let i = 0; i < 5; i++) { console.log("Iteration", i); } // Iteration 0 // Iteration 1 // Iteration 2 // Iteration 3 // Iteration 4 </script> </body> </html>
<!DOCTYPE html> <html> <body> <h2>Counting from 0 to 4</h2> <script> for (let i = 0; i < 5; i++) { console.log("Iteration", i); } // Iteration 0 // Iteration 1 // Iteration 2 // Iteration 3 // Iteration 4 </script> </body> </html>