Skip to content

Instantly share code, notes, and snippets.

@dgershman
Created November 15, 2013 19:21
Show Gist options
  • Select an option

  • Save dgershman/7490074 to your computer and use it in GitHub Desktop.

Select an option

Save dgershman/7490074 to your computer and use it in GitHub Desktop.
var bits = function(val, max) { for (var i = 0; i <= max; i++) console.log(val & (1 << i)); };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment