In the following exercises, you will learn how to create and use JavaScript functions. Functions are one of the most important features of almost every programming language. A function is a reusable piece of code that performs a task. For example, a function can perform a specific calculation based on certain arguments that are passed to it. You can call the function throughout your code and work with the results you get from it.
  1. Function declaration
  2. Function expression
  3. Correctly return value from function (1)
  4. Correctly return value from function (2)
  5. Functions - parameters and arguments (1)
  6. Functions - parameters and arguments (2)
  7. Functions - parameters and arguments (3)
  8. Return early from function