Skip to content

Instantly share code, notes, and snippets.

@paulserraino
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulserraino/63ab780fb78cc746451f to your computer and use it in GitHub Desktop.
Save paulserraino/63ab780fb78cc746451f to your computer and use it in GitHub Desktop.
bitwise anonymous functions
~~function (a) {
return a ^ function () { // 1 ^ 2
return a << 1 | function () { // 2 | 0
return a << 1 & function () { // 2 & 1
return a; // 1
}()
}()
}()
}(1)
// 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment