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