Java Reference
In-Depth Information
tion declarations as they are akin to how functions are declared in other languages. Others
prefer function expressions because it is clear that functions are just another value assigned
to a variable, rather than a special feature of the language. Whether you use function declar-
ations or function expressions is often a matter of personal taste, but whatever you choose
to do―be consistent!
Invoking a Function
Invoking a function is to run the code inside the function's body. To invoke a function,
simply enter its name, followed by parentheses. This is how we'd invoke the hello func-
tion, for example:
<< "Hello world!"
Search WWH ::

Custom Search