Difference between “ == “ and “ === “ operators in JS?

Forums JavaScriptDifference between “ == “ and “ === “ operators in JS?
Staff asked 3 years ago

Answers (1)

Add Answer
Staff answered 3 years ago

== in JavaScript is used for comparing two variables, but it ignores the datatype of variable.

=== is used for comparing two variables, but this operator also checks datatype and compares two values

Subscribe

Select Categories