Swift: If – Else Conditional Statement

After having a good knowledge of Swift's basics, let us now turn to one of the most important and used functions in programming, the if...else function. If you have never programmed before, don't worry, the if...else function is pretty simple to understand. Basically, we will state a condition and if the condition is true then... Continue Reading →

Advertisements

Swift: Comparison Operators

Before entering into the core of programming and see more complex functions such as the If...else, let's first take a look at the different types of comparisons that exist in Swift. There are several ways to compare for example 3 numbers. Let's declare for example 2 constants as follows: let num1 : Int = 1 let... Continue Reading →

Swift: Arithmetic output

We have seen how to output the text, let's now focus on numbers... To recall (Swift: Types of variables – constants), we have seen that numbers can be declared either as integers, doubles or floats. In Swift, as in any programming language, we can addition, subtract, multiply or divide numbers. So let's declare 2 variables... Continue Reading →

Swift: Output multiple strings

We have seen how to declare variables (Swift: Types of variables – constants) and how to output them (Swift: output and comments). Now, we will learn how to output multiple variables at once. Output: a combination of strings Let's declare 2 different variables as strings and give them a text value. So let's take for... Continue Reading →

Swift: output and comments

After seeing the different types of data that exist in Swift (Swift: Types of variables – constants), we will now learn how to output it. Basically, in Swift, in order to output the data, we need to use the function "print" and we put the variable name between parentheses! var name : String = "Batman" print... Continue Reading →

Swift: Types of variables – constants

After we have seen that we can store data in 2 types of references: variables and constants (Swift: Variables and Constants), we will now take a look at what type of data can we store and how to correctly declare it. You should keep in mind, that in Swifts, variable / constants declarations can be done directly... Continue Reading →

Swift: Variables and Constants

Variables and constants are the foundations of every programming language and Swift is no different. They can simply be seen as references. So ,what's the difference between variables and constants? Each time we declare something, we will either need to declare it as a variable or a constant. So how do we know what to... Continue Reading →

Swift 101

Swift... the programming language that allows us to create all those beautiful applications that we use on our iPhones, iPads or even MacBooks. The most likely reason that you have landed here, is that you are planing to invest the time to learn to develop your own iOS applications. However keep in mind that starting to learn... Continue Reading →

Blog at WordPress.com.

Up ↑