siriusmart@lemmy.ml to Programmer Humor@lemmy.ml · 7 months agothe hardest exam questionlemmy.mlimagemessage-square8fedilinkarrow-up19arrow-down10
arrow-up19arrow-down1imagethe hardest exam questionlemmy.mlsiriusmart@lemmy.ml to Programmer Humor@lemmy.ml · 7 months agomessage-square8fedilink
minus-squaregaael@lemmy.worldlinkfedilinkarrow-up1·7 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·7 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.