S
Surgeon
Hi,
How do I give a method optional arguments and default values?
Exmpl:
foo is a function that multiplies all of its arguments together. If
there is not any argument, a default value of "qwerty" returns.
foo(2,3) ----> 6
foo(2,3,5) ----> 30
foo(2,3,5,2) -> 60
foo() -----------> "qwerty"
How do I give a method optional arguments and default values?
Exmpl:
foo is a function that multiplies all of its arguments together. If
there is not any argument, a default value of "qwerty" returns.
foo(2,3) ----> 6
foo(2,3,5) ----> 30
foo(2,3,5,2) -> 60
foo() -----------> "qwerty"