operator
Estimated reading time:
2 minutes
operators are symbols which use for different operations or tasks on data.
arithmatic operators
| symbols |
Description |
+ |
plus |
- |
minus |
* |
multiplacation |
/ |
division |
% |
modulus / remainder |
++a |
pre increment |
a++ |
post increment |
--a |
pre decrement |
a-- |
post decrement |
= |
assign |
order operator
exponents and roots
multiplication and division
addition and subtraction
- United States - PEMDAS
- Parentheses, Exponents, Multiplication/Division, Addition/Subtraction.
- canada - BEDMAS
- Brackets, Exponents, Division/Multiplication, Addition/Subtraction.
- uk - BODMAS
- Brackets, Order, Division/Multiplication, Addition/Subtraction.
~ resource wiki
~ resource microsoft
Assignment operators
| symbols |
description |
| = |
assign |
| += |
variable plus value then asign |
| -= |
variable minus value then asign |
| *= |
variable multiplacation value then asign |
| /= |
variable division value then asign |
comaparision operator
| Header One |
Header Two |
| == |
equal |
| !== |
not equal |
| === |
identical (strict equality) |
| !=== |
not identical |
| > |
greater than |
| => |
equal greater than |
| < |
less than |
| =< |
equal less than |
logical operator
| Header One |
Header Two |
| && |
and |
// |
and |
| ! |
not |
string operator
let firstName = 'Mostafa';
let lastName = 'Kamal';
let fullName = firstName + ' ' + lastName;
console.log(fullName);
js, operator