August 2017
Beginner
374 pages
10h 41m
English
Let's take a look at an impure function. The following example has a side effect:
let i = 0function counter () { return i++}
In this case, the function is modifying a global variable, which causes a side effect. This means that with the same input, this function will not return the same output:
Read now
Unlock full access