Any function can produe a side effect such as:

  • printing a text on the screen
  • influence the state of an object
  • modifing a file

Now, the side effects are considered a bad thing, which is true, but they are also why we programm, to change a file or to display somenthing, tho, we do not code for changing the state of an object, so if possible is good norm to leave the state alone, such as with Pure Functions.