Merge pull request #27 from overflowsith/is-divisible-by
add a isDivisible function
This commit is contained in:
7
snippets/divisible-by-number.md
Normal file
7
snippets/divisible-by-number.md
Normal 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;
|
||||
```
|
||||
Reference in New Issue
Block a user