Functions
11 lessons
- 01FunctionsLearn how to define and call basic functions in JavaScript using the `function` keyword.
- 02Function HoistingUnderstand how JavaScript hoists function declarations to the top of the file, allowing you to call them before they are defined.
- 03Unit Testing FunctionsAn overview of how functions are tested in professional environments using unit tests.
- 04Multiple Return ValuesDiscover how JavaScript handles multiple return values and why returning an object is the preferred solution.
- 05Functions As ValuesLearn about first-class and higher-order functions, allowing you to pass functions as arguments to other functions.
- 06ScopeUnderstand the four levels of scope in JavaScript: Global, Module, Function, and Block.
- 07Anonymous FunctionsLearn how to define functions inline without a name, useful for passing logic as arguments.
- 08Default ParametersSpecify default fallback values for function parameters to handle missing arguments gracefully.
- 09Passing by ValueUnderstand how primitive types are passed into functions by value, creating a copy rather than mutating the original.
- 10Immediate InvocationLearn how to use Immediately Invoked Function Expressions (IIFEs) to execute logic instantly.
- 11Chapter 3 Cheatsheet: FunctionsA quick summary and cheatsheet of function declarations, hoisting, higher-order functions, scope, and IIFEs.