Question d’entretien chez Codinova

Difference between == & === ?

Réponses aux questions d'entretien

Utilisateur anonyme

6 août 2020

if you compare a number with a string with numeric literal, == allows that, but === doesn't allow that. ===(exact match), == (any data type return true)

Utilisateur anonyme

27 janv. 2021

Main difference between "==" and "===" operator is that formerly compares variable by making type correction e.g. if you compare a number with a string with numeric literal, == allows that, but === doesn't allow that, because it not only checks the value but also type of two variable, if two variables are not of the same type "===" return false, while "==" return true.

Utilisateur anonyme

2 déc. 2020

== matches value while === matches value amd also it's type