Functions

  • Functions can be labeled by variables like any other data
  • Once assigned to a variable, the variable name can be used to call the function
function add(a, b) {
    return a + b;
}

const myRenamedFunction = add;
myRenamedFunction(1,2) // Returns 3

13 / 21