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:

Swift Operators - Basic Part 3 (Range operators in swift)

Range Operators: Closed Range operators  Half-Open Range Operators One-Sided Ranges Closed Range Operators:  a...b It defines...