!= vs !== javascript
(0 == '0') // true
(0 === '0') // false
('' == 0 ) // true, the string will implicitly be converted to an integer
('' === 0 ) // false, no implicit cast is being made
!= vs !== javascript
(0 == '0') // true
(0 === '0') // false
('' == 0 ) // true, the string will implicitly be converted to an integer
('' === 0 ) // false, no implicit cast is being made
javascript == vs ===
/**
* In js :
* == it convert the variable values to the same data type before performing comparison.
* example : comparison between string and interger data type
*/
(5 == "5") // returns true
// === it does not convert data type of variable before performing comparison.
// example:
(5 === "5") // return false
what is differ between between three equal and two equal
false == 0 => true
false === 0 => false
0 != false => false
0 !== false => true
== vs === javascript
== Equal to (1 == 1, 1 == "1") // equal in value ("1" is a string)
=== Equal value and equal type (1 === 1 but, 1 !== "1" // not equal type
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us