Updated examples

Removed duplicate and unnecessary examples.
This commit is contained in:
Angelos Chalaris
2018-01-04 14:22:56 +02:00
parent 1afd4a18ab
commit 00b3da7504
45 changed files with 52 additions and 104 deletions

View File

@ -1,6 +1,6 @@
### howManyTimes
Returns the number of times `num` can be divided by `divisor` (integer or fractional) without getting a fractional answer.
Returns the number of times `num` can be divided by `divisor` (integer or fractional) without getting a fractional answer.
Works for both negative and positive integers.
If `divisor` is `-1` or `1` return `Infinity`.
@ -22,11 +22,8 @@ const howManyTimes = (num, divisor) => {
```
```js
howManyTimes(100, 2); //2
howManyTimes(100, -2); //2
howManyTimes(100, 2.5); //2
howManyTimes(100, 3); //0
howManyTimes(100, 0); //0
howManyTimes(100, 1); //Infinity
howManyTimes(100, -1); //Infinity
howManyTimes(100, 2); // 2
howManyTimes(100, 2.5); // 2
howManyTimes(100, 0); // 0
howManyTimes(100, -1); // Infinity
```