Functions in JavaScript

Functions in JavaScript: What Is a Function, Parameters and Return Values, Function Expressions and Arrow Functions.

Updated

  1. What Is a Function (Novice): A function is a named set of steps you write once and run whenever you need it, by calling its name.
  2. Parameters and Return Values (Novice): Parameters let a function take in different values each time you call it, and return hands a result back to the code that called it.
  3. Function Expressions and Arrow Functions (Apprentice): A function can be stored in a variable like any other value, arrow functions (=>) write small functions in a line, and default values fill in the arguments a caller leaves out.