0b:二进制
0o:八进制
0x:十六进制
~~~js
console.log(0b10);//2
console.log(0o10);//8
console.log(0x10);//16
console.log(0b11===3);//true
console.log(0b10===8);//true
console.log(0x11===16);//true
let num=10;
console.log(num.toString(2));//2进制转换
console.log(num.toString(8));//8进制转换
console.log(num.toString(16));//16进制转换
console.log(num.toString(5));//5进制转换