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

Chapter 5. Using Functions > ADDING PARAMETERS TO FUNCTIONS

ADDING PARAMETERS TO FUNCTIONS

In the previous exercise you learned how to create a function and call it from any timeline. In this exercise, you’ll add parameters to a function and learn how to use them. The following is the syntax for creating a function that accepts parameters:

					function convertToMoonWeight (myWeight){
					weightOnMoon = myWeight/6.04;
					}
				


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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