+ 3

Where === and !== operators are used???

Please explain === and !== with proper example.

21st Apr 2017, 8:22 PM
Sandip Bhambre (Sandy)
Sandip Bhambre (Sandy) - avatar
4 ответов
+ 19
== and != only checks of both sides have the save value. === and !== (strictly [not] equal to) compares both the value and the type. Both must be the same to check out true. Ex: "8" == 8 is true (Both sides are 8, and are considered equal by double ==). "8" === 8 is false (string compared to int, so not strictly equal). 8.0 !== 8 is true (float compared to int).
21st Apr 2017, 8:37 PM
Tamra
Tamra - avatar
+ 11
See SoloLearn's Javascript course, chapter Basic Concepts > Comparison Operators, lesson 2.
21st Apr 2017, 8:39 PM
Tashi N
Tashi N - avatar
+ 5
@Tamra Thank you so much....😊
21st Apr 2017, 8:41 PM
Sandip Bhambre (Sandy)
Sandip Bhambre (Sandy) - avatar
+ 3
@Tashi there is no valid explanation. Thanks to @Tamra i got my answer.
21st Apr 2017, 8:49 PM
Sandip Bhambre (Sandy)
Sandip Bhambre (Sandy) - avatar