🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Side Effect

In plain terms

Any change a function makes to state outside its return value.

Going deeper

Side effects include modifying variables, writing files, or printing, anything observable beyond returning a value. Functional programming minimizes and isolates them.

Under the hood

Pure functions avoid side effects, easing testing and reasoning; effects make code harder to predict and parallelize.

Examples

console.log, writing to a database, mutating a global, network calls.

Think of it like...

Like a chef who, besides cooking your dish, also rearranges the whole kitchen.

Feedback & Bug Report