Learning Swift – Part 2

Swift Basics

Swift, like many other programming languages, distinguishes between the various types of variables like: String, Integers, Floats and Booleans. Discover what is a type and how you can use it while programming.

 

Printing Results

Watch Video

A print function displays the values of variables or constants in the console and is commonly used when programming. Learn the basic use of the print function.

 

Strings

Watch Video

Learn about other properties of Strings like mutability, concatenation, interpolation, and more.

 

Numbers and Booleans

Watch Video

Exploring other types to store: whole numbers or integers, fractions or floats or doubles, and booleans (true and false)

 

Operators

Every programming language allows you to perform basic math like addition, subtraction, division and multiplication which are known as binary operators. These operators have a precedence in which they are executed in a single statement, which affects the result. Finally, you have Unary operators that act on a single target.

 

Binary Operators

Watch Video

Every programming language allows you to perform basic math like addition, subtraction, division and multiplication. These are called binary operators

 

Operator Precedence

Watch Video

When using multiple operators in one expression the order in which they are executed affects the resulting value.

 

Unary Operators

Watch Video

A unary operator is a single operator that can affect the resulting value of the variable.

 

End of Part 2