Skip to content

Instantly share code, notes, and snippets.

What is scope?
"Scope" describes the the scope and limitations of impact that a variable can have on the overall code and program. The scope of a variable is
dependent on how and where it is defined or declared. A variable defined outside a fucntion will have "global scope" and can effect
the entire program; a variable defined within a function will have "block scope" and will be limited to it's particular block of code.
Why are global variables avoided?
A variable with "global scope" can effect the entire program whereas a variable
with "block scope" is contained within it's particular block of code, so can be controlled more specifically. "Block scope"
https://repl.it/@Chayce/Traffic-lights-drill
https://repl.it/@Chayce/Error-alert-drill
https://repl.it/@Chayce/Is-divisible-drill
https://repl.it/@Chayce/temperature-conversion-drill
*didn't get the temp drill correct
https://repl.it/@Chayce/area-of-a-rectangle-drill
https://repl.it/@Chayce/Wiseperson-generator-drill
https://repl.it/@thinkful/Shouter-solution
https://repl.it/@Chayce/text-normalizer-drill