This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://repl.it/G9KJ/1165 | |
https://repl.it/G9KO/832 | |
https://repl.it/G9KW/1233 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://repl.it/G9GB/779 | |
https://repl.it/G9GI/781 | |
https://repl.it/G9GO/560 | |
https://repl.it/G9GS/673 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://repl.it/Ggbk/962 | |
https://repl.it/Ggcp/793 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://repl.it/G9Do/503 | |
https://repl.it/G9EI/566 | |
https://repl.it/G9Ec/497 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://repl.it/G8oY/1203 | |
https://repl.it/G8sD/896 | |
https://repl.it/G8sU/689 |