Created
May 21, 2023 10:02
-
-
Save wspringer/914cf0ca4584410d4fb1056d6f7609c0 to your computer and use it in GitHub Desktop.
Pointless isEven functions are the cat videos of code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Because the Internet | |
*/ | |
const isEven = (x) => { | |
const ys = (x >>> 0).toString(2).split(""); | |
return ys[ys.length - 1] !== ys[0]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment