Skip to content

Instantly share code, notes, and snippets.

@poonia
Last active January 10, 2019 10:52
Show Gist options
  • Save poonia/c71d4b4cba83f82ae48fe6af81ca8e69 to your computer and use it in GitHub Desktop.
Save poonia/c71d4b4cba83f82ae48fe6af81ca8e69 to your computer and use it in GitHub Desktop.
Pure Function
/*
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