Newby Coder header banner

Operators

What is an Operator in programming

An operator is a symbol or keyword associated with a specific operation or action

For example + operator is used to perform addition

Following are some basic type of operators

Arithmetic operators

Basic arithmetic operators are: +>, -, *, /, %

Assigment operators

Assignment operators are used to assign values

Examples are =, +=, -=, *=

Comparison operators

These are used to compare values

Examples are ==, != >, >=, <, <=

Logical operators

Typically used in conditional statements and loops for evaluating a condition, these operators return boolean values

Examples are && (and), || (or), ! (not)