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

Chapter 12. Functions > Using Functions

Using Functions

Any function—built-in or custom-written—can be used by calling its name followed by parentheses. All parameters that are sent to a function must be enclosed in parentheses. If there are no parameters being sent, you would simply leave the parentheses blank. Following is an example of a function that takes the parameters userName and score:

function scoreTally(userName, score) {
     score.display = userName;
     score.display = score;
}


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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