How to specify integer in binary, hexadecimal and octal in JavaScript ES6

1 Answer

0 votes
const b = 0b111
console.log(b); 

const hx = 0xFF;
console.log(hx); 

const o = 0o14;
console.log(o); 




/*
run:
     
7
255
12
   
*/

 



answered Mar 11, 2020 by avibootz
...