in JavaScript by
Q:
Difference between “ == “ and “ === “ operators.

1 Answer

0 votes
by
Both are comparison operators. The difference between both the operators is that,“==” is used to compare values whereas, “ === “ is used to compare both value and types.

Example:

var x = 2;

var y = "2";

(x == y)  // Returns true since the value of both x and y is the same

(x === y) // Returns false since the typeof x is "number" and typeof y is "string"
Click here to read more about JavaScript
Click here to read more about Insurance

Related questions

0 votes
asked Mar 12, 2020 in JavaScript by GeorgeBell
+1 vote
asked Jul 16, 2019 in JavaScript by Indian
0 votes
asked Nov 22, 2019 in JavaScript by AdilsonLima
0 votes
asked Sep 9, 2019 in Spark Sql by ivor2019
0 votes
asked Jan 9 in Cloud Computing by SakshiSharma
...