Is it advisible to check for equality using === or !== operator in case of variables having only two possible values? What is the difference in terms of performance using these two comparison operators?
Asked
Active
Viewed 74 times
-5
-
https://stackoverflow.com/q/111368/560648 – Lightness Races in Orbit Mar 14 '18 at 17:10
-
Use one, test it, use the other, test it, compare... – Heretic Monkey Mar 14 '18 at 17:11
1 Answers
-2
Use whatever makes the code more readable.
There's virtually no performance difference between ===
and !==
.

Marco
- 7,007
- 2
- 19
- 49