> For the complete documentation index, see [llms.txt](https://huang-jason.gitbook.io/js-syntax/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://huang-jason.gitbook.io/js-syntax/undefined.md).

# ===

```javascript
// All of these evaluate to 'true'!
// type coercion automatically
console.log(false == '0');
console.log(null == undefined);
console.log(" \t\r\n" == 0);
console.log('' == 0);

// And these do too!
if ({}) // ...
if ([]) // ...
```

* Both `{}` and `[]` are objects, and any object will be coerced to a boolean value of `true` in JavaScript.
* Prefer to use `===` and `!==` to avoid any unintended side-effects of type coercion.

## `NaN`

```ruby
console.log(NaN == NaN);    // false
console.log(NaN === NaN);   // false
console.log(isNaN(NaN));    // true
```
