Swift programming

Swift programming for Beginners – Swift while and repeat while Loop

(Swift for Beginners) Swift while and repeat while Loop In this article, you will learn to create while and repeat…while loops in Swift programming. In the previous article, we learned about for-in loop to run a set of tasks for a certain number of times. In this article, you will learn to use while and repeat..while as an alternative of for-in …

Swift programming for Beginners – Swift switch Statement

(Swift for Beginners) Swift switch Statement In this article, you will learn to use switch control statements to control the flow of your program’s execution. The switch statement is also a variety of Swift control statement e.g.if-else, guard etc., that performs different actions based on different conditions. The beauty of switch statement is, it can compare a …

Swift programming for Beginners – Swift if, if…else Statement

(Swift for Beginners) Swift if, if…else Statement In this article, you will learn to use two conditional statements: if and if…else to control the flow of your program’s execution. In programming, you may want to perform different actions based upon the specified condition is true or false (which is known only during the run time). For such cases, control …