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

Exercises

If you want to spend more time working with the Math and Date objects in JavaScript, perform the following activities:

  • Modify the random number script in Listing 9.3 to prompt the user for the number of random numbers to generate.

  • Modify the random number script to run three times, calculating a total of 15,000 random numbers, and display separate totals for each set of 5,000. (You'll need to use a for loop that encloses most of the script.)


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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