Created
December 17, 2016 15:09
-
-
Save nikhilmufc7/206a11f1813cb9de0e1d1014779ba853 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. | |
A. Scope is the declaration and accesibility that is possible in javascript, i.e the local and global scope wherin the variables | |
get stored in a global way, that can accessed anywhere in the program or | |
a Local variables have ,They can only be accessed within the function. | |
Why are global variables avoided? | |
Global variables are avoided because it creates a fuss if we programming 1000s of lines of codes. | |
Explain JavaScript's strict mode? | |
Strick mode is a way of writing secure javascript. It helps us in avoiding globad variables. It will throw an error if the | |
variable used is not declared. | |
Explain variable hoisting in JavaScript. | |
Hositing in javascript is that a variable can be declared after it has been used or before it has been used. Javascript engine | |
is well versed in evaluating it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment