siriusmart@lemmy.ml to Programmer Humor@lemmy.ml · 5 months agothe hardest exam questionlemmy.mlimagemessage-square8fedilinkarrow-up16arrow-down10
arrow-up16arrow-down1imagethe hardest exam questionlemmy.mlsiriusmart@lemmy.ml to Programmer Humor@lemmy.ml · 5 months agomessage-square8fedilink
minus-squaregaael@lemmy.worldlinkfedilinkarrow-up1·5 months agoYou’ll find an npm package to help you count up to 2. (I recently learned - maybe here - that the is-even package has over 170k weekly downloads)
minus-squareDrusenija@lemmy.worldlinkfedilinkarrow-up1·5 months agoWhat’s even wilder is if you look at the code of that package, all it does is include the is-odd package and then return !is-odd. And the is-odd package isn’t much better, it does some basic checks on the input and then returns n % 2 === 1.
You’ll find an npm package to help you count up to 2.
(I recently learned - maybe here - that the is-even package has over 170k weekly downloads)
What’s even wilder is if you look at the code of that package, all it does is include the is-odd package and then return !is-odd. And the is-odd package isn’t much better, it does some basic checks on the input and then returns n % 2 === 1.