Skip to content

Instantly share code, notes, and snippets.

@gabeno
Created March 8, 2014 14:50
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 gabeno/9431654 to your computer and use it in GitHub Desktop.
Save gabeno/9431654 to your computer and use it in GitHub Desktop.
Deduce meaning of assignment operator |=
a = new Array();
for (var b = 0; b < 10; b++) {
a[0] |= b; // <= ?
}
@gabeno
Copy link
Author

gabeno commented Mar 8, 2014

I came across this while reading this article

@gabeno
Copy link
Author

gabeno commented Mar 8, 2014

bitwise or mdn ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment