Sometimes we want to repeat a specific action a number of times. So for example, we want to print a word on the screen 10 times. And the question is, should we write the same code 10 times, that would be tedious and boring, and most of all, a waste of time. Therefore, in JavaScript, there is a very good way to repeat a specific action. Many times, we have two options to repeat some action or some code many times by using something called for loop or while loop. By using for loop or while loop, you will be able to repeat a specific action or a specific code a number of times, instead of writing the same code over and over and over again by yourself.