42
is a Harshad number as 42
is divisible by (4 + 2)
without remainder.
Assume that the series is defined as the numbers in increasing order.
isHarshadOrNiven
should be a function.
testString: assert(typeof isHarshadOrNiven === 'function');
- text: 'isHarshadOrNiven()
should return {"firstTwenty": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42],"firstOver1000": 1002}
'
testString: assert.deepEqual(isHarshadOrNiven(), res);
```