# For, While, and Do...While Loops in JavaScript | kirupa.com

**URL:** https://forum.kirupa.com/t/for-while-and-do-while-loops-in-javascript-kirupa-com/352228
**Category:** programming
**Created:** [November 23, 2014, 2:35am UTC](https://forum.kirupa.com/t/for-while-and-do-while-loops-in-javascript-kirupa-com/352228 "2014-11-23T02:35:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [November 23, 2014, 2:35am UTC](https://forum.kirupa.com/t/for-while-and-do-while-loops-in-javascript-kirupa-com/352228/1 "2014-11-23T02:35:59Z")

</div>

by [kirupa](http://www.kirupa.com/me/index.htm) | 4 March 2014

When you are coding something, there will be times when you want to repeat an action or run some code multiple times. For example, let's say we have a function called saySomething that we want to repeatedly call 10 times.

* * *
This is a companion discussion topic for the original entry at [http://www.kirupa.com/html5/loops\_in\_javascript.htm](http://www.kirupa.com/html5/loops_in_javascript.htm)
