- Using the
()operator (parentheses) - Using the
:operator (colon)
, (comma).
If the list of arguments of a function or method is empty, you can omit the () operator. The : operator is not used in this case.
Understanding how to set function and method parameters using parentheses and colon operators.
() operator (parentheses): operator (colon), (comma).
If the list of arguments of a function or method is empty, you can omit the () operator. The : operator is not used in this case.