var a = 10; //十进制
var b = 0b10; //二进制
var c = 0o10; //八进制
var d = 0x10; //十六进制
console.log(a); //10
console.log(b); //2
console.log(c); //8
console.log(d); //16
javascript 进制数的了解
最新推荐文章于 2024-04-19 21:27:24 发布
var a = 10; //十进制
var b = 0b10; //二进制
var c = 0o10; //八进制
var d = 0x10; //十六进制
console.log(a); //10
console.log(b); //2
console.log(c); //8
console.log(d); //16