Month: December 2020

Swift programming for Beginners – Swift Operator precedence and associativity

(Swift for Beginners) Swift Operator precedence and associativity In this article you will learn about the rules used to evaluate a expression with operators and operands. Swift Operator precedence Operator precedence is a collection of rules used in order to evaluate a given mathematical expression. When there are several operators used in a single expression, …

Swift programming for Beginners – Swift Operators

(Swift for Beginners) Swift Operators In this article, you’ll learn everything about different types of operators in Swift programming language, their syntax and how to use them with examples. Operators are special symbols (characters) that carry out operations on operands (variables and values). Some basic operations includes assigning, changing, combining and checking values. For example, + is …

Swift programming for Beginners – Swift Expressions, Statements and Code blocks

(Swift for Beginners) Swift Expressions, Statements and Code blocks In this article, you will learn about Swift expressions, statements and blocks. In the previous chapter, we used expressions, statements and blocks without explaining what it is although it’s used in every Swift program. After you know what variables, operators are it will be easier to …

Swift programming for Beginners – Swift Basic Input and Output

(Swift for Beginners) Swift Basic Input and Output In this article, you will learn different ways to display output and get input in Swift. Swift Basic Output You can simply use print(_:separator:terminator:) function to send output to standard output (screen). See Swift function article to learn about functions in Swift. The function print(_:separator:terminator:) accepts three parameters. items: Items to print in the …