samuelmarina / is-even

Is a number even?
1.85k stars 193 forks source link

HA! #225

Closed george1605 closed 2 years ago

george1605 commented 3 years ago

just using Boolean()

And BTW, the Modulus(%) operator exists for over 20 YEARS in JS, so it's not UNTESTED or other BLAH BLAHs.

george1605 commented 3 years ago

And if you want for strings, just use: function isEvenStr(str){ if(Number(str) != NaN) return isEven(Number(str)); }

liam-cornu commented 2 years ago

20 years? That's too old, probably deprecated too, Samuel's approach is much more modern and by such should be preferred to your neolithic unsanitary and inefficient solution.

sadancooler-dumb-coder commented 2 years ago

Write the code manually and don't be a boolean alright?