Side effects
What are side effects? We can define those as some change in state, or some interaction with outside elements (the user, a web service, another computer, whatever) that occurs during the execution of some calculations or process.
There's a possible misunderstanding as to the scope of this meaning. In common daily speech, when you speak of side effects, it's a bit like talking of collateral damage--some unintended consequences for a given action. However, in computing, we include every possible effect or change outside the function. If you write a function that is meant to do a console.log() call to display some result, that would be considered a side effect, even if it's exactly what you intended the function to do in the first ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access