Just
like
variables
we
can
data
type
our
func:ons
in
strongly
typed
languages.
Java:
public float function calculateTax(float pay, float taxPer) {
return pay * 0.2;
}
Ac7onScript:
public function calculateTax(pay:Number, taxPer:Number):Number {
return pay * 0.2;
}
Execu:ng
func:ons
in
both
these
languages
is
the
same
and
passing
parameters
to
a
func:on
is
the
same
as
we
declare
them,
with
a
comma
separated
list.
var taxPaid = calculateTax(20000, 17.5);
Parameters
(arguments)
must
be
passed
in
the
correct
order.
[email protected]
twi