Constants
Variables that won't change.
Constants
Variables that won't change.
0
0
Checkbox to mark video as read
Mark as read

So far we have used variables with the keyword var. This is because we expect to change their value at some point.

However, if our variable is never going to change, we can declare it with the keyword let, which makes our code a bit more efficient.

let name: String = "Pablo"
let age: Int = 35

0 Comments

Join the community to comment
Sign Up
I have an account
Be the first to comment

Accept Cookies

We use cookies to collect and analyze information on site performance and usage, in order to provide you with better service.

Check our Privacy Policy