Guest User

Untitled

a guest
Oct 17th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. What is scope? Your explanation should include the idea of global vs. local scope - From my understanding, scope it is sort of frame that i apply to global and local functions. I have to avoid using the same name for the func. in global and local scopes, because there are
  2. situations where it could lead to a problem in entire code. Better, if I'll use let and const instead when giving name to variables in my
  3. (in and out) functions.
  4.  
  5. Why are global variables avoided? because of side effects. Situation where my return value can be different from the same input defined
  6. in global(parent) and local scopes.
  7.  
  8. Explain JavaScript's strict mode - mode that I should be using on top of every JS code. The reason behind is, triger will be enabled any
  9. time I forgot to put let or const variables.
  10.  
  11. What are side effects, and what is a pure function? When the same value is changes (alters) inside of local and parent scopes is called
  12. side effect. Using pure functions means - (side effects free) functions, the only exception is when function specifically meant to be with
  13. side effects.
Add Comment
Please, Sign In to add comment