Skip to content

Instantly share code, notes, and snippets.

View MoNarchEnterprises's full-sized avatar

Leonard B. Lay MoNarchEnterprises

  • MoNarch Enterprises, LLC
  • Fairburn, GA
View GitHub Profile
https://repl.it/G9Lo/445
https://repl.it/G9Lj/653
https://repl.it/G9Lf/569
https://repl.it/G9Lb/710
https://repl.it/G9KW/1233
https://repl.it/G9KJ/1165
Questions
What is scope? Your explanation should include the idea of global vs. local scope.
Scope determines what parts of the code have direct access to a variable and can mutate that variable's value. A global variable
can be accessed by all parts of the code and can be changed in any place where it is accessed. A local variable can only be accessed or
changed within the function block that it is defined in.
Why are global variables avoided?
Global variables are able to be changed in any part of the code, so it makes programs indeterminate. If a value of a global variable is
changed then it's difficult to know where that change occurred.
https://repl.it/G9KJ/1165
https://repl.it/G9KO/832
https://repl.it/G9KW/1233
https://repl.it/G9GV/820
https://repl.it/G9G7/1109
https://repl.it/G9HI/769
https://repl.it/G9H5/806
https://repl.it/G9Hd/593
https://repl.it/G9Hl/500
https://repl.it/G9GB/779
https://repl.it/G9GI/781
https://repl.it/G9GO/560
https://repl.it/G9GS/673
https://repl.it/Ggbk/962
https://repl.it/Ggcp/793
https://repl.it/G9Do/503
https://repl.it/G9EI/566
https://repl.it/G9Ec/497
@MoNarchEnterprises
MoNarchEnterprises / gist:60e6f599ad46a7db808901b8f76cf2b2
Created September 17, 2017 05:54
Results for JS string functions
https://repl.it/G8oY/1203
https://repl.it/G8sD/896
https://repl.it/G8sU/689