Pure functions | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Pure functions

Can anyone help clarify what the side effects are that required from pure functions?

16th Sep 2016, 8:48 PM
Stephen Aladiran
Stephen Aladiran - avatar
1 Answer
+ 1
For a function to be pure, it needs to always give the same output for a given input, and have no side-effect, like altering a reference, printing something, etc.
16th Sep 2016, 8:54 PM
Zen
Zen - avatar