In programming, there are (too many!) things that are considered side effects. In JavaScript programming, including both frontend and backend coding, the more common ones you may find include the following:
- Changing global variables.
- Mutating objects received as arguments.
- Performing any kind of I/O, such as showing an alert message or logging some text.
- Working with, and changing, the filesystem.
- Updating a database.
- Calling a web service.
- Querying or modifying the DOM.
- Triggering any external process.
- Just calling another function that happens to produce a side effect of its own. You could say that impurity is contagious: a function that calls an impure function automatically becomes impure on its own!