Comparison Operators & Logical Operators

Comparison Operators (derive boolean values)

==,===  Equality operators(value and / or type )  

2==2//true    '2'===2//false   3===3//true 3====5//false 'h' =='s'//false

>.<  >=, <=  Greater than, less than, greater or equal, lesser or equal     

5>3//true  5<3 // false  'a'<'b'//true   'c' <'b'//false      4<=4// true

!, !=, !==  Negation / inverse (i.e something is NOT true)

!(4<4)// true  5!==2//true  8!=8//false  '4'!==4//true  '4'!=4//false 

Logical Operators (combine boolean values)

&& AND Yields true if both combined values are true 

//yields true 5==5&&3<4

//yields are false 5==5&&6<4

OR Yields true if one of both values is true 

//yields true 

5==5or 3<

yields true 

5==5or 6<4


Dev tools eg



Comments

Popular posts from this blog

Events Js