What do you mean by identical in operators? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

What do you mean by identical in operators?

There is a equal to operator and also a equal to and identical operator, what does that mean?

15th Dec 2016, 3:16 AM
Ananth Vishwanath
Ananth Vishwanath - avatar
1 Réponse
+ 3
The equal to operator (==) will compare whether two values are equal, but the identical operator (===) will compare whether two values are equal and of the same data type. For instance: 1 == "1" is true, but 1 === "1" is false because 1 is an integer and "1" is a string.
15th Dec 2016, 5:32 AM
Antek