Files
30-seconds-of-code/snippets/divisible-by-number.md
2017-12-12 16:31:39 +02:00

8 lines
178 B
Markdown

### Divisible by number
Use the modulo operator (`%`) to check if the remainder is equal to `0`.
```js
const isDivisible = (dividend, divisor) => dividend % divisor === 0;
```