Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2018 04:52 AM
Hi TrenaFritsche,
=== is a strict comparison operator. For strict equality the objects being compared must have the same type and:
- Two strings are strictly equal when they have the same sequence of characters, same length, and same characters in corresponding positions.
- Two numbers are strictly equal when they are numerically equal (have the same number value).
NaNis not equal to anything, includingNaN. Positive and negative zeros are equal to one another. - Two Boolean operands are strictly equal if both are true or both are false.
- Two objects are strictly equal if they refer to the same
Object. NullandUndefinedtypes are==(but not===). [I.e. (Null==Undefined) istruebut (Null===Undefined) isfalse]
The link below provides more examples:
JavaScript — Double Equals vs. Triple Equals