# Operators

An Operator is a function that acts on two or more values and returns a value. The most commonly used operators are special symbols like + for addition, - for subtraction. The variables that an operator acts on are called operands.

Example:

x+y = 30;
In the above example, + is the operator that adds the two operands x and y together.

## Types of Operators

### Arithmetic Operators

An arithmetic operator operates on two numeric values and returns a single numeric value.

Syntax

<op1> <Operator> <op2>

Where <op1> and <op2> are numeric expressions.

 Operator Functionality + addition of and - subtracts from * multiplies and / divides by % remainder when dividing by

### Relational Operators

A relational operator compares two values and returns a Boolean expression (either true or false) depending on the two values' relationship.

Example

5 > 4 returns true.
233.6 < 94.22 returns false.

Syntax

<op1> <Operator> <op2>

 Operator Functionality > is greater than >= is greater than or equal to < is less than <= is less than or equal to == is equal to != is not equal to

### Conditional Operators

A conditional operator operates on a Boolean expression. You can write complex decision logic by combining relational operators and conditional operators.

Syntax

<boolean expression> && <boolean expression>
<boolean expression> || <boolean expression>
! <boolean expression>

 Operator Functionality && Both the left and right boolean expressions are true ll Atleast one of the boolean expression is true ! boolean expression is false