+ // Addition
- // Subtraction
* // Multiplication
/ // Division
++ // Increment
-- // Decrement
** // Exponentiation
% // Modulus
Arithmetic operators are used to perform arithmetic on numbers.
&& // and, if both are true
|| // or, if either are true
! // not, truthy returns false, falsy returns true
Used to determine logic between variables or values.
= // x = y |same as| x = y
+= // x += y |same as| x = x + y
-= // x -= y |same as| x = x - y
*= // x *= y |same as| x = x * y
/= // x /= y |same as| x = x / y
%= // x %= y |same as| x = x %= y
**= // x **= y|same as| x = x ** y
Assignment operators assign values to Javascript variables.
typeof operand = type of data
object instanceof constructor = true // instanceof
Returns type of data.
== // equal to
=== // equal value and equal type
!= // not equal
!== // not equal value or not equal type
> // greater than
< // less than
>= // greater than or equal to
<= // less than or equal to
? // ternary operator | if true ? execute : false |
Used to compare Javascript values, returns boolean.