A side effect is a change a program makes outside the answer it returns. For example, a function might calculate a total and also save a file or send a notification.

Think of asking a helper to tell you the time, then discovering they also turned on the lights. The extra action is a side effect.

Side effects are not always bad; many programs need to save or send information. It helps to know when an action changes something so you can avoid surprising results.