Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript == vs ===

/*
The == operator will compare for equality after doing any necessary type conversions. 
The === operator will not do the conversion, so if two values are not the same type === will simply return false. 
Both are equally quick.
*/

0 == '' // true
0 === '' // false
 
PREVIOUS NEXT
Tagged: #typescript
ADD COMMENT
Topic
Name
7+2 =