Guest User

Untitled

a guest
Jul 21st, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. What is scope? I like to think of scope as if it were a russian stacking doll. There is the outer-most layer, that can contain rules that
  2. /could/ interact with it's inner layers, if the inner layers do not write their own code. Another way to describe it, might be National laws,
  3. State Laws, and County laws.
  4.  
  5. Why are global variables avoided? Global variables are to be avoided because it can cause pure code to become indefinitive, and could break,
  6. change, or just be a bit unreliable. Basically, it's always better to work within your scope, rather than relying on global variables.
  7. --I think it's just best practice, and a way to be thorough and safe in making sure your code is solid.
  8.  
  9. Explain JavaScript's strict mode. Strict mode helps identify problems with poor naming methods quickly. As far as my experience with it, it
  10. helps aid in using 'let' rather than directly or "sloppily" naming a variable.
  11.  
  12. What are side effects, and what is a pure function?
  13. Side effects might be variables overriding one another, causing code to break or have bugs. A pure function, is one that's code is always
  14. the same return every time, another word I might use, would be reliable functions. You can always count on them to be functioning as intended.
Add Comment
Please, Sign In to add comment