If you don’t want to set a default value to your variable you will have to write your variable like this:
This will check if there is a value and assign it to a value. In this case bill is nil so I’m defining a default string to the value so …
A tuple can hold two values of any type but combines them into one value. The aboutMe var has a String and Int value. We can access them with the …
Booleans are the item that tells weather it’s true or false. For example: Is it sunny outside could return true or false depending on things. var canYouSeeTheSun = true var …
Depending on what kind of accuracy you require with your floating-point number a double will be more precise than a float. The double has precision of at least 15 decimal …
There are two ways to write comments. The first is:The above doesn’t work for multiple lines though. It’s best to use:
You don’t need semicolons in Swift though if you want to put two statements on one line then do this: