Global Variables in Swift
Stop! Stop! Stop! WRONG. BAD.
4 min readMay 15, 2020
Difficulty: Beginner | Easy | Normal | Challenging
Global variables are defined outside of functions, methods, closures or types. That is, they are defined at the global scope.
Local variables are variables that are defined within a function, method or closure.