Pure Functions

Let's learn and practice pure functions in this lesson.

We'll cover the following...

A pure function is a function that has the following characteristics:

  • Its outputs depend solely on its inputs
  • It has no side effect

A side effect is a change in program state or an interaction with the outside world. A database access or a console.log() statement are examples of ...