Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. What is scope? Scope can be global or block, if global it can be called and changed outside of a function. If the scope is block then it can only be called inside a function.
  2. Why are global variables avoided? Global scopes are to be avoided because can create bugs in code by allowing variable values to be changed.
  3. Explain JavaScript's strict mode? JavaScript's strict mode prevents global variables from being created by throwing errors when variables are created without using let or const.
  4. What are side effects, and what is a pure function? Side effects are when variables values are changed unintenededly, and pure functions are functions written without using global variables
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement