Sayeed Ahmed
Difference between == and === in javascript?
By Sayeed Ahmed in JavaScript on Oct 06 2016
  • Bidyasagar Mishra
    Aug, 2019 2

    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.

    • 0
  • kakku singh
    Mar, 2017 16

    0 == false // true 0 === false // false, because they are of a different type 1 == "1" // true, automatic type conversion for value only 1 === "1" // false, because they are of a different type 1 === 1 // true, because they are strictly same type null == undefined // true null === undefined // false '0' == false // true '0' === false // false

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS