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

Exercises

If you would like to further explore the concepts you learned in this chapter, perform the following activities:

  • Modify the Greet function to accept two parameters, who1 and who2, and to include both names in a single greeting dialog. Modify Listing 4.2 to use a single function call to the new function.

  • Modify Listing 4.4 by removing the var keyword before name2 in the Greet() function. Are the greetings different than the original version? If they are, try to understand why.

  • Add some additional customizable features to Listing 4.5. For example, you could prompt the user for a URL and include a link on the page.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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