A JavaScript function is a subprogram because its body consists of a series of statements. The instructions in a function's body can be a variable declaration, return call, console.log() invocation, function definition, or any other JavaScript statements. The computer set the lastName parameter to undefined because we provided
Table of contents
Table of ContentsWhat Is a Function?Why Functions?Syntax of a JavaScript FunctionWhat Is a function Keyword?What Is a Function Name?What Is a Parameter?What Is a Code Block?What Is a Function Body?Types of JavaScript FunctionsWhat Is a JavaScript Function Declaration?What Is a JavaScript Function Expression?What Is a JavaScript Arrow Function Expression?What Is a JavaScript Immediately Invoked Function Expression?OverviewSort: