3 ms·
> In another case, I saw an NPM package that detects if the number is odd or even. Writing n%2 == 0 is that hard thing? Repository in question: 'use strict';
by raxxorrax 7y ago
> In another case, I saw an NPM package that detects if the number is odd or even. Writing n%2 == 0 is that hard thing?
Repository in question:
'use strict';
var isOdd = require('is-odd');
module.exports = function isEven(i) {
return !isOdd(i);
};