3.4 Comparison Operators

Hello everyone and welcome to this video we will see the comparison operators, we use to compare the value of a variable with another one. So here we have x =1 Let's look at the first comparison operator, we want to check if x>0, we get "true". So the result of an expression that includes a comparison operator is a boolean Let's look at another example with this time >= we change the value from 0 to 1 to see if x >= 1 The other operators are quite similar, we have the operator < and <= 1 let's save the changes and look what we get on the console, the 3rd element is false because x is not less than 1 It is less than or equal to 1, that's why we got a false here These 4 operators that we have here are relational operators So we can check if x = 1 So we have 3 equal signs Well of course, x =1 If you want to check if x is not equal to a given value, you replace the first equal sign by a ! Let's save the changes and the result of the last expression is false because x = 1. Here is the demonstration on the comparison operators in JavaScript, so we meet again for a porochaine vdéo on the equality operators.