# JavaScript Overview – Looping

There are several methods to create loops within JavaScript.

- For

                          for (var x = 0; x < 100; x++) {...}

- While

                          while (!inputFile.isAtEnd()) {...}

- Do While

                          do {...} while (foundItem==0);

- For/in

                          for (var propName in myObject) {...}

  Note: The property order is not guaranteed.

- Break

  This is used to exit the enclosing loop:

                          if (foundRecord) break;

- Continue

  This is used to begin the next loop iteration:

                              if (skipThisItem) continue;