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

# Type Coercion

A language that converting the value of certain type to another type. All languages do this type conversion

When the operands at the left and right of the operator is of different type, one of the value is converted to equivalent value by JavaScript engine.

```javascript
1 == '1'; // true
1 != '1'; // false
```

In JavaScript this happens only if we use `==` operator.

```javascript
1 === '1'; // false
1 !== '1'; // true
```

If we use ===, that means compare two values but don't coercive the values.
