- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi,
The triple equals avoids any type conversions, in this case isDate and the false literal are both boolean so it doesn't make much difference, false == false and false === false both evaluate to true, but "" == false evaluates to true but "" === false evaluates to false. It's just a good habit to get into.
Here's a link to a guy that can explain it better, ECMA-262 » Note 2. ECMAScript. Equality operators.
Regards
Bruce
Views
Replies
0 Likes
Total Likes