Hi Everyone - I am trying to translate this statement into Actionscript:
"Sally is 5 years old. Jenny is 4 years old. The combined age of Sally and Jenny is 9 years."
This is what I have so far:
function getAges (sallyAge:Number,jennyAge:Number,combinedAge:Strin g)
{
trace("Sally's Age:" + sallyAge);
trace("Jenny's Age:" + jennyAge);
trace("Combined Age:" + combinedAge);
}
getAges (5,4,"9");
It works - but I would like to have it so that the Actionscript is actually doing the math. Would I declare a variable like
var combinedAge = sallyAge + jennyAge;
? And where would I put it? Thanks in advance for any assistance, I am really new to this.