Created
November 12, 2019 02:02
-
-
Save JasonLMoffit/3f836be4f642d3c83fece51ac009085f to your computer and use it in GitHub Desktop.
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
| Scope is where variables are declared, whether that be in the global scope or in block scope. | |
| In global scope variable can be referenced anywhere, and depending on the order of inclusion, by things in other files. | |
| Block scope refers to things inside a function block, between the opening and closing curly braces. | |
| Global variables are to be avoided because they can cause conflicts and hard to track bugs. | |
| JavaScript 'stict mode' will throw error for undeclared variables. It also "prohibits some syntax likely to be defined in future" standards (MDN | https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode). | |
| Side effects are unplanned effects, or mutations. Pure Functions are function that return the same resuts | |
| with the same arguments every time. When a function returns different results with the same arguments, this is a side effect, | |
| and an impure function. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment