1. Ternary Operator
  2. While and repeat while
  3. Closed Range and Half Open Range
  4. For loop
  5. continue
  6. break
  7. Switch case
  8. Using Switch case with tuples
  9. Function
  10. Returning different data types using tuples in Function
  11. Function Overloading

1. Ternary Operator

basically and alternate for if else statement and shortening the syntax

// ternary operator 
let a = 9
let b = 5

let min = a > b ? b : a
let max = a > b ? a : b

print("min: \(min)")
print("max: \(max)")
// to check even and odd using ternary operator
let num1 = 7

num1 % 2 == 0 ? print("num1 is even") : print("num1 is odd")

2. While and repeat while

// while loop
let name = "Zeeshan Waheed"

var counter = 1

while counter <= 10 {
  print(name)
  counter += 1 
}

print()

// repeat while 
repeat {
  print(name)
  counter += 1
} while counter <= 10