Skip to Content
Mastering JavaScript Functional Programming
book

Mastering JavaScript Functional Programming

by Federico Kereki
November 2017
Intermediate to advanced
386 pages
9h 22m
English
Packt Publishing
Content preview from Mastering JavaScript Functional Programming

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.
Start your free trial

You might also like

Mastering JavaScript Functional Programming - Second Edition

Mastering JavaScript Functional Programming - Second Edition

Federico Kereki

Publisher Resources

ISBN: 9781787287440Supplemental Content