# Operators
* `operator` - `+, -, *, /` Etc.
* `operand` - Is another name for arguments that operators are applied to. Example: `8 + 8`. 8 is called the `operand`.
* `unary` - An operator is `unary` if it has a single `operand`. Example: `-x`.
* `binary` - When we have two operands. Example: `8 + 8` or `"my" + "string"`
* `+` - This will convert any string or non string into a string. Example: `1 + '2'` // `12`.
* A `unary` plus with convert to a number. Example: `+true` // `1`. Shorthand for `Number()`
* Operators have a precedence, means what happens first. Like math, read left to right, multiplication happens before addition.
* `%` - Remainder. Example: `5 % 2` // `1`.
* `**` - Exponentiation. Example `2 ** 3` // 8 ( 2 * 2 * 2)
* `++` - postfix `x++` or prefix `++x`. This operator works only on variables.
* `--` - postfix `x--` or prefix `--x`. This operator works only on variables.
* Example: `let counter = 1; let a = counter++; // alert(a);` // 1
* Example: `let counter = 0; alert( ++counter );` // 1
* Notice on usage of incrementing we use prefix.
* Bitwise Operators - These are not commonly used or specific to JS. `&, |, ^, ~, <<, >>, >>>`
* Modify in place - `+=, -=, *=` Etc.
* `,` Example: `let a = (1 + 2, 3 + 4);` // a = 7. The first expression is evaluated then thrown away before the comma.
## Logical
* AND `&&`, OR `||`, NOT `!`
### AND
* Returns true if all are true.
* Finds the first false value and return.
* If all are true, return the last operand.
```js
true && true // true
false && true // false
true && false // false
false && false // false
```
### OR
* Finds the first truthy value.
```js
true || true // true
false || true // true
true || false // true
false || false // false
```
### NOT
* Converts operand to boolean and inverses it.
* The double !! converts a value to boolean then inverse again.
```js
!true // false
!false // true
!!'string' // true. This is the same as using: Boolean('string')
```