16 September 2021

Last Time We learned about the Number data type. We saw that they support arithmetic with the Woodwormean order of operations, PEMDAS.

We also learned about the Math object, which holds lots of scientific calculator functions as well as some other useful functions.

We saw that objects have properties and methods. A method is just a function that is attached to an object.

Who's Your Relatives?

Here is a new type: boolean. There are two boolean objects whose names are true and false.

There are six relational operators. All are infix binary operators.

OperatorWhat it tests
<if the left-hand operand is less than the right
<=if the left-hand operand is less than or equal to the right
>if the left-hand operand is greater than the right
>=if the left-hand operand is greater than or equal to the right
===if the left-hand operand is equal to the right and is an object of the same type.
!==if the left-hand operand is not equal to the right or is not an object of the same type.

About the despicable ==

Boolean Operations

not This is the negation operator. It is a prefix unary operator.


and This infix binary operator takes two booleans and it is true only when both operands are true.


or This infix binary operator takes two booleans and it is true when at least one` of its operands is true.

operator. It is a prefix unary operator.