# integers

[JS](../../..) ⟩ [value](../..) ⟩ [primitive](..) ⟩ [number]() ⟩ integers

{% hint style="success" %}
```javascript
x | 0        // x -> integer
```
{% endhint %}

{% tabs %}
{% tab title="💈範例" %}
```javascript
const pixelRatio = window.devicePixelRatio;
const width  = canvas.clientWidth  * pixelRatio | 0;
const height = canvas.clientHeight * pixelRatio | 0;
```

:point\_right: [three.js](https://threejs.org/manual/#en/responsive)
{% endtab %}
{% endtabs %}
