Function Declarations vs Expressions
Which of the following is a function declaration?
The function declaration is `function myFunc() {};`. Function declarations are defined using the `function` keyword followed immediately by a mandatory function name, a list of parameters in parentheses, and the function body enclosed in curly braces. The defining characteristic of a function declaration is that it stands alone as a statement and creates a named function. The syntax pattern is: `function name(parameters) { /* body */ }`. Function declarations are hoisted in their entirety, allowing them to be called before they appear in the code. The other options are all function expressions: storing anonymous functions or arrow functions in variables or creating functions using the Function constructor. These store function objects in variables rather than declaring a function directly.