What’s a Value in Swift?

Andrew Zheng
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 vars and lets 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.

--

--

Andrew Zheng

WWDC21 Scholar. I like to read manga and write about Swift. Check out my app, Find — look for text in real life, with outrageous speed. getfind.app