# Learning to Code: Day 45 — Basic JavaScript Part 10

Hello everyone! Hope you are all keeping well. Today we’re going to be taking a focussed look at Comparisons in JavaScript, thanks as always to FreeCodeCamp for the lessons. Let’s get started.

The inequality operator ( written as !=) is the opposite to the equality operator and means to say something is “Not Equal”, returning as false, whereas the equality operator would state the opposite, and vice versa.

Like the equality operator, the inequality operator also carries out type conversion when making a comparison.

Here we can see the inequality operator in action on line 2 for the if statement saying that if the condition val (tested as 10 on line 8) is not equal to 99, then the function testNotEqual will return “Not Equal”.

The strict inequality operator (!==) works in opposition to the strict equality operator (===), returning false where the strict equality operator would return true. It also does not carry out type conversion.

Heads up, we’re about to get a little repetitive with the phrasing of these next chapters…

The greater than operator (>) compares the values of two numbers, returning true if the number on the left of the operator is greater than the number on the right, and false otherwise. Like the equality operator, it carries out type conversion.

The greater than or equal to operator (>=) compares the values of two numbers, returning true if the number on the left of the operator is greater than or equal to the number on the right, and false otherwise. Like the equality operator, it also carries out type conversion.

The less than operator (<) compares the values of two numbers, returning true if the number on the left of the operator is less than the number on the right, and false otherwise. Like the equality operator, it carries out type conversion.

The less than or equal to operator (<=) compares the values of two numbers, returning true if the number on the left of the operator is less than or equal to the number on the right, and false if the number on the left is greater than the number on the right. Like the equality operator, it carries out type conversion.

The logical and operator (&&) allows you to test more than one thing at a time. If you want to parse faster through data as you code, the logical and operator can come in handy here.

Take this example from FreeCodeCamp where an if statement was nested inside another if statement:

The logical and operator can be used here to return true if and only if the operands (the conditions in this case) on either side of it return true. Let’s take a look:

So, any number outside of 5–10 (excluding 5 and 10) will return “Yes”.

Lastly, the logical or operator (||) returns true when the operands on both side of it are also true, like the logical and operator.