Loops:- This is a function called loop which is used to run a code or program a number of times or you can also run the program to infinite times, like if you wants to run a code of print the counting from 1 to infinty on the webpage, it can run the program from 1 to the infinite. These are of three types:- For loop, While loop and Do while loop.
Here is the syntax for the use of loops in Javascript program:-