Created
January 15, 2018 23:51
-
-
Save Sstobo/c51476ce43562bd9d7eeaf68fb239f4b to your computer and use it in GitHub Desktop.
[Functional Programming] #react #js
This file contains hidden or 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
Procedural Programming | |
###### Pure function | |
- function that does not rely on data outside of its scope. Just does itself. No side effects. | |
- one output | |
- if it manipulates a global variable, it is impure (copy list into new variable, output that | |
- take an argument, make it newVariable, modify, output | |
{ robot.name = "Sean"} is a "reference" <- this will modify a global variable | |
{ robot = { name: "Sean" } } is "pass by value" <- this will not leave scope | |
" = Higher Order function = Function within a function | |
# type Array.prototype. in console to see a list of functions | |
MAP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment