Function statements are the preferred technique for defining functions in strict mode. A function statement begins with the function keyword, followed by:
- the function name;
- the parameters, in a comma-delimited list enclosed in parentheses;
- the function body, that is, the ActionScript code to be executed when the function is invoked, enclosed in curly braces.
function traceParameter(aParam:String) {
trace(aParam);
}
traceParameter("hello"); // Output: hello