Codinova interview question

Difference between == & === ?

Interview Answers

Anonymous

Aug 6, 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)

Anonymous

Jan 27, 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.

Anonymous

Dec 2, 2020

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