April 2017
Beginner to intermediate
394 pages
9h 16m
English
To reiterate, a global variable is a variable that is declared outside of a function or class. Doing this makes our variable accessible in every function, hence us calling it global. When being taught programming in school, we were often told that global variables are a bad thing or at least, that modifying global variables in a function is considered to be poor programming practice.
There are numerous reasons why using global variables is a bad idea:
Read now
Unlock full access