Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

7. JavaScript: Control Statements I > Self-Review Exercises

Self-Review Exercises

7.1 Fill in the blanks in each of the following statements:

a. All scripts can be written in terms of three types of control statements: ________, ________ and ________.

b. The ________ double-selection statement is used to execute one action when a condition is true and another action when that condition is false.

c. Repeating a set of instructions a specific number of times is called ________ repetition.

d. When it’s not known in advance how many times a set of statements will be repeated, a(n) ________ (or a(n) ________, ________ or ________) value can be used to terminate the repetition.

7.2 Write four JavaScript statements that each add 1 to variable x, which contains a number.

7.3 Write JavaScript statements to accomplish each of the following tasks:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint