Created
January 8, 2017 15:28
-
-
Save dartpain/4a84acd50a6543637ad721976e71010b to your computer and use it in GitHub Desktop.
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
What is scope? Your explanation should include the idea of global vs. local scope. | |
Local scope is inside a function, global would be outside of it where variable will be used throughout the code. | |
Why are global variables avoided? | |
Global variables should be avoided as the can interfere with other variable that is used in the local scope, it might as well iterfere with other varables in local scope throught all js file defined. | |
Explain JavaScript's strict mode | |
It doesnt allow any global variables to be created. | |
What are side effects, and what is a pure function? | |
side effects is when other funcutions are accidentaly interfered with, function that doesnt have a possibility of a side effect. | |
Explain variable hoisting in JavaScript. | |
It the way that interpreted read code, it starts by looking through the variables and by allowing you to call it before declaring it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment