Global variables | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Global variables

If a global variable is declared and it's value is defined within the main function can that variable be used in another sub function. will its value be retained from the main function in the sub function?

26th Nov 2018, 4:37 AM
Gig Hazard
Gig Hazard - avatar
1 Answer
+ 1
Why don't you try this in playground ?
26th Nov 2018, 10:12 AM
Prokopios Poulimenos
Prokopios Poulimenos - avatar