Thursday, January 09, 2020

Swift Operators - Terminology

Terminology

  • Unary Operators: 

    • It operates on a single target.
    • It appears immediately before their target or post their target
                  Example: -a , !a, a!

  • Binary Operators:

    • It operates on two targets
    • It appears in between two targets.
               Example: 2+4, 9*5

  • Ternary Operators

    • It operates on three targets
    • In Swift, it has only one ternary operator.
                   Example:  a ? b: c







No comments:

Create a list in SwiftUI with sticky section headers

 Sample Code import SwiftUI struct ContentView : View {     @State var isCustomViewControllerDisplayed = false     @State private va...