A function definition looks like:
function name ( formal, formal, ) bodyThe keyword function may be abbreviated func. We look at each part of this definition in turn below.
Function definitions are expressions; they may occur anywhere an expression may. In particular, since expressions are also statements, a function definition may also occur anywhere a statement occurs.