Created
September 29, 2018 16:06
-
-
Save insthync/5bada28c9568bd99a929ed91e23fa03f to your computer and use it in GitHub Desktop.
Test bitwise shift (javascript)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sum = 0; | |
for (var i = 0; i < 16; ++i) | |
{ | |
console.log(1 << i); | |
sum += (1 << i); | |
} | |
console.log("sum : " + sum); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment