In this exercise, you will write your own function. This function is going to accept two numerical arguments, add those two arguments together, and spit out the answer (the sum of the two numbers) in an alert dialog box.
1. Name the function addMe(), and name the local argument variables for the function myFirstNum and mySecondNum.
2. Make sure that you make at least two links which call the function; each link should pass different numbers to the function.
Don't forget that number values do NOT have quote marks around them when they are passed as arguments to your addMe function; if they had quote marks around them, they'd be STRINGS, not numbers!
View Solution Page.
Copyright © 2001 Michael Masumoto. All Rights Reserved.