What’s a Value in Swift?
1 min readJun 15, 2020
--
It’s really simple! Take a look at this code:
var justSomeBoolean = false
In this case, the value of justSomeBoolean
is false
. That’s it!
In Swift, values are contained in variables (var
) and constants (let
). You can think of var
s and let
s as boxes — they hold stuff!
Oh, and also, a property is just a variable or constant, except it belongs to a struct
, class
, or enum
.