<!DOCTYPE html> <html> <body> <script> let x = 2; for(let i=1; i<=10; i++) console.log(x*i); </script> </body> </html>
In above example, the following statement:
will be executed for 10 times with value of i from 1 to 10. The detailed description, about how a for loop executes, is given in its separate tutorial.
« Previous Tutorial Next Tutorial »
Like/Share Us on Facebook 😋