Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- 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
- (in and out) functions.
- Why are global variables avoided? because of side effects. Situation where my return value can be different from the same input defined
- in global(parent) and local scopes.
- 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
- time I forgot to put let or const variables.
- 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
- side effect. Using pure functions means - (side effects free) functions, the only exception is when function specifically meant to be with
- side effects.
Add Comment
Please, Sign In to add comment