What’s a Value in Swift?

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.

I like reading manga and writing about Swift. Check out my app, Find — look for text in real life, with outrageous speed. getfind.app

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store