• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Using do...while() Loops

Here's a recap of what you've learned so far:

  • The while() statement is the simplest of the loops, and it's useful when you're not sure how many times a loop will execute or when your script has some kind of natural comparison expression it can use to end the loop (such as the user clicking Cancel in a prompt box).

  • The for() statement is the most common of the loops, despite its relatively complex syntax. It's extremely useful for loops that must run a specified number of times.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint