Side effect

A function that changes something outside itself: writes a file, updates a global, prints, mutates a shared list. A function with no side effects is called pure, and pure functions are the ones that are easy to test.

Back to the glossary