Question d’entretien chez Sysco LABS

What is difference between == and ===

Réponses aux questions d'entretien

Utilisateur anonyme

23 févr. 2020

== checks for abstract equality (compares the value) whereas === checks for strict equality (compares value and type) for example 6=='6' returns true and 6==='6' returns false

3

Utilisateur anonyme

6 janv. 2022

int a = 2; float b = 2.0; a == b; // This would be true because it compares only the values of the variables a === b // This would not be true because it compares both value and data type of the variable

Utilisateur anonyme

26 avr. 2019

Equal and not equal

1