Using forloop:
You can execute a group of statements multiple times based on a specific condition by using ForLoop.
Demo:
- Let’s create a document called forLoop.html.
- Write the following code:
- Execute the script by opening the file in a Web Browser. If you are using Internet Explore click on “Allow Blocked Content” to allow the script to execute and if you are using Mozilla Firefox then click on allow “ActiveX Controls”.
Thanks for reading the blog.