Functions & Scope
Learn Functions & Scope (JavaScript Fundamentals, JavaScript) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Functions in JavaScript Functions are first-class citizens in JavaScript - they can be assigned to variables, passed as arguments, and returned from other functions. Three common syntaxes: 1. Function Declaration 2. Function Expression 3. Arrow Function (ES6, shorter syntax, does NOT have its own this )