What is identical(===) operator ? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 9

What is identical(===) operator ?

anyone can explain......

2nd Jun 2017, 8:01 AM
Vismay Katharani
Vismay Katharani - avatar
3 Réponses
+ 18
This operator compares two elements for type and value. In Javascript, for example, this will be true: 1 == "1" // true ...because Javascript converts automatically the type for compare the elements. With the "===" operator, Javascript doesn't convert the type of the elements, so... 1 === "1" // false
2nd Jun 2017, 8:10 AM
Maz
Maz - avatar
+ 7
thank you
2nd Jun 2017, 8:11 AM
Vismay Katharani
Vismay Katharani - avatar
+ 3
1=="1" //is true
5th Jun 2017, 2:01 PM
Ahmed Abofteem
Ahmed Abofteem - avatar