进制转换
2023年02月10日
一、通过 number.toString() 转换
let num=10;
console.log(num.toString(2)); //1010
console.log(num.toString(8)); //12
console.log(num.toString(16)); //a
let num=10;
console.log(num.toString(2)); //1010
console.log(num.toString(8)); //12
console.log(num.toString(16)); //a