## 1. Shorter If…Else Statements with Ternary Operators

`let money = 100if money > 0 {    print("Some money")} else {    print("No money")}`
`money > 0 ? print("Some money") : print("No money")`

## 2. Destructuring Tuples

`func getInfo() -> (name: String, email: String) {    return (name: "Matt", email: "matt@example.com")}`

## Using the Colors

`let color1: CGColor = UIColor(red: 209/255, green: 107/255, blue: 165/255, alpha: 1).cgColorlet color2: CGColor = UIColor(red: 134/255, green: 168/255, blue: 231/255, alpha: 1).cgColor…`

# 1. Array.find()

`{ brand:"Skoda", price:15000}`

# Understanding Recursive Enumerations in Swift

## What is a recursive enumeration and what does the “indirect” keyword do?

`enum Test {    indirect case value(Test)}`
`indirect enum Test {    case value(Test)}`

# 1. Sometimes Two Equal Numbers Aren’t Equal

`>>> a = 256>>> b = 256>>> a is bTrue>>> a = 257>>> b = 257>>> a is bFalse`

## Artturi Jalli

Tech Expert, Entrepreneur, Software Engineer from Finland. Writing about programming and science. Check out my blog at https://www.codingem.com/

Get the Medium app