Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 350 Bytes

binary-octal-literals.md

File metadata and controls

13 lines (10 loc) · 350 Bytes

#Binary and Octal Literals In in ES5, hexadecimal numbers can be represented with 0x in front of the number:

console.log(0xFFFFF);

Now, in ES6, a similar feature has been added for binary and octal numbers:

console.log(0b1010101); //parseInt(1010101, 2); es5 version
console.log(0o0123147); //parseInt(0123147, 8); es5 version