Merge pull request #27 from overflowsith/is-divisible-by

add a isDivisible function
This commit is contained in:
Angelos Chalaris
2017-12-12 16:32:36 +02:00
committed by GitHub
2 changed files with 16 additions and 0 deletions

View File

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