Cool post, Uddesh!
I have a note on this paragraph.
console.log('100' === 100) // False
In the case of triple equal, the result will be False because triple equal operator strictly checks the type of left and right side.
In fact, we can say that triple equal checks value with coercion "disabled". On the other hand double equal allows coercion.
The triple equal checks both the value and the type, so in this example's case, the values are equal but the types aren't, so the output is false (false(type) & true(value) => 0 & 1 == 0 => false).
Yes, This also can be a case but as far as I concerned triple equal checks the type of the value of left and right side.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Cool post, Uddesh!
I have a note on this paragraph.
In fact, we can say that triple equal checks value with coercion "disabled". On the other hand double equal allows coercion.
The triple equal checks both the value and the type, so in this example's case, the values are equal but the types aren't, so the output is false (false(type) & true(value) => 0 & 1 == 0 => false).
Yes, This also can be a case but as far as I concerned triple equal checks the type of the value of left and right side.