Skip to content

Instantly share code, notes, and snippets.

@armand1m
Created March 26, 2022 10:41
Show Gist options
  • Save armand1m/e343e5c1b4e9d0156663019e685ad10d to your computer and use it in GitHub Desktop.
Save armand1m/e343e5c1b4e9d0156663019e685ad10d to your computer and use it in GitHub Desktop.
isOdd function implemented using bitwise comparison in js
export const isOdd = (num) => Boolean(num & 0x01);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment