Skip to content

Instantly share code, notes, and snippets.

@trustedtomato
Created August 30, 2017 12:09
Show Gist options
  • Save trustedtomato/42d318a509cc341afe2f65e606e8792d to your computer and use it in GitHub Desktop.
Save trustedtomato/42d318a509cc341afe2f65e606e8792d to your computer and use it in GitHub Desktop.
2^n in an other way
twoExp = n => eval('0b1' + Array(n - 1).fill(0).join(''));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment