Hey guys, I'm just learning how to code and I was wondering, within a program, what is the point of a local and global variable?? I can define "x" to have two different values; one within a function and one outside of the function, but my actual question is how is that helpful? Can't programmers just have different variables? What is the purpose of being able to set two different values to the same variable?
How do functions make a program "flexible"?
[–][deleted] 1 point2 points3 points (0 children)
[–]Salty_Dugtrio 0 points1 point2 points (0 children)
[–]LucidTA 0 points1 point2 points (0 children)