Last active
January 10, 2019 10:52
-
-
Save poonia/c71d4b4cba83f82ae48fe6af81ca8e69 to your computer and use it in GitHub Desktop.
Pure Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Defination - | |
A pure function returns values by using only its arguments. It will not use any additional data nor it changes any data structures, touches no storage, and emits no external events (like network calls). | |
*/ | |
function sum(a,b) { | |
return a + b; | |
} | |
arr.map((item) => item.id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment