Swift Operators - Part Three Flashcards

1
Q

Operators

A

An operator is a special symbol or phrase that you use to check, change or combine values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

3 Kinds of Operators

A

Unary, Binary, Ternary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Binary Operators

A

Operate on Two Targets (1 + 1): the two ā€œ1sā€ are Operands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Expression

A

A combination of an operator with Operands is called an Expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Binary Operators

A

Addition: +

Subtraction: -

Division: /

Multiplication: *

Remainder: %

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Long Division - Remainder (Modulo Operator).

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Assignment Operator (=)

A

The assignment operator denoted by the equal to symbol initializes or updates the value of one operand.

The operand on the left hand side is updated by the value on the right-hand side.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Comparison Operators:

A

Equal To: ==

Not Equal To: !=

Greater Than: >

Lesser Than: <

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Operator Precedence

A

Left to Right:
Higher Precedence Level (150):

Multiplication: *

Division: /

Remainder: %

Precedence Level (140):

Addition: +

Subtraction: -

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Unary Operators

A

Work with one operand only.

NOTE:

Always place the increment operator to the left of the operand.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly