A side effect is any application state change that is observable outside the called function other than its return value. For example modifying any external variable like global variable, logging to console, writing to file, writing to network, calling other functions with side effects.

function printSomething(foo) {
// printing to console make this function to have a side effect.

Side effects are mostly avoided in functional programming, which makes the program easier to understand and to test.