a guest Aug 20th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- Why are global variables avoided?: Global variables can be easily faulted to allow bugs and be faulty by allowing it to look outside of function for variables.
- What are side effects, and what is a pure function?: A side effect is when the function reaches outside into a parent element and alters a value outside of its scope. On the other hand, a pure function is when a function is written so the function will always return same value with no side effects.
RAW Paste Data