Swift Operators

Ramesh Chavan
Oct 3, 2022

--

Operators are special symbols that perform operations on variables and values.

Types of Operators

  1. Arithmetic operators
  2. Assignment Operators
  3. Comparison Operators
  4. Logical Operators
  5. Bitwise Operators
  6. Other Operators

1. Swift Arithmetic Operators

Arithmetic operators are used to perform mathematical operations like addition, subtraction, multiplication, etc.

Swift Arithmetic Operators

2. Swift Assignment Operators

Here, = is an assignment operator that assigns 5 to x. Here's a list of different assignment operators available in Swift.

Swift Assignment Operators

3. Swift Comparison Operators

Comparison operators compare two values/variables and return a boolean result: true or false.

Swift Comparison Operators

4. Swift Logical Operators

Logical operators are used to check whether an expression is true or false. They are used in decision-making.

Swift Logical Operators

5. Swift Bitwise Operators

In Swift, bitwise operators are used to perform operations on individual bits.

Swift Bitwise Operators

6. Other Swift Operators

Here’s a list of other operators available in Swift. We’ll learn more about these operators in later tutorials

Other Swift Operators

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Ramesh Chavan
Ramesh Chavan

Written by Ramesh Chavan

Like to work on iOS, Android, UIPath and Graph DB

No responses yet

Write a response