Hacker News new | ask | show | jobs
by f00zz 2149 days ago
The commit history is surprisingly long. The actual test evolved from

  return !!(~~i >> 0 & 1)
to

  return !!(~~i & 1);
to

  const n = Math.abs(value);
  return (n % 2) === 1;