Now that you know how to create variables, its now time to perform some calculations and comparisons with the variables.

Operators are special symbols that perform specific operations on one, two, or three operands, and then return a result. The operators are grouped into 6 categories:

Arithmetic Operators
Assignment Operators
Comparison Operators
Unary Operators
Logical Operators / Conditional Operators
Bitwise Operators

Arithmetic Operators

The arithmetic operators are used to perform basic mathematical operations of


Assignment Operators

This is one of the most common operator. The assignment operator (=), is used to assign a value on its right to the variable/identifier on the left.

--TODO Add a diagram of the assignment operator

Comparison Operators

These operators are used to compare two values or more values.

Logical/Conditional Operators

These are also called short-circuit AND and short-circuit OR operators.These operators are used to perform ANDing and ORing operations on two boolean expressions. They are commonly used together with the comparison operators

Bitwise Logical Operators

These operators are used to manipulate bits in memory. They are advanced operators and we will not look at them in this section.

results matching ""

    No results matching ""