Comment on I wish

<- View Parent
KoboldCoterie@pawb.social ⁨8⁩ ⁨months⁩ ago

Looking at their code, it’s really just a bunch of checks to make sure the variable passed is actually an integer that it can work with, followed by the solution:

return (n % 2) === 1;

I can’t think of a more efficient way to get the answer. It does seem like it’d take more time to download the package than to just write the function yourself, though.

source
Sort:hotnewtop