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

Functions

As we’ve already seen, a function is a set of statements that run when you call them, and not before, and you can call a function by treating its name as an expression to be evaluated. Here’s the formal syntax for creating a function using the function statement:

function name([param1] [, param2] [..., paramN]) { 
    statements 
} 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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