Let's look at some of these types of operators.
Arithmetic operators are used to perform arithmetic on numbers.
Unary operation: an operation with only one operator.
Binary operator: an operation that operates on two operands and manipulates them to return a result.
We can use the plus operator to join strings. Or in other words, to concatenate different strings.
typeof operator give us the type of the value
The most straightforward assignment operator is just the equal sign:
And so this equal sign here is actually itself an operator. In this case x will be assigned 15 because the plus operator is executed before the assignment operator. And that's based on a couple of rules about operator precedence that we will learn in the next lesson.
There are more assignment operators:
We use comparison operators to produce boolean values. The result of comparison operator should be a boolean.
So, comparison operators compares its operands and returns a boolean based on whether the comparison is true or false.