Give any four JavaScript comparison operators with description & example of each.
Answers
Explanation:
Comparison operators are used in logical statements to determine equality or difference between variables or values.
Given that x = 5, the table below explains the comparison operators:
Operator Description Comparing Returns Try it
== equal to x == 8 false
x == 5 true
x == "5" true
=== equal value and equal type x === 5 true
x === "5" false
!= not equal x != 8 true
!== not equal value or not equal type x !== 5 false
x !== "5" true
x !== 8 true
> greater than x > 8 false
< less than x < 8 true
>= greater than or equal to x >= 8 false
<= less than or equal to x <= 8 true
Answer:
arithmetic Operators.
Comparison Operators.
Logical (or Relational) Operators.
Assignment Operators.
Conditional (or ternary) Operators.
Explanation:
hope it helps u pls mark me as the brainliest