숫자 표기법
//10진법
let decimal = 255;
//16진법
let Hexadecimal1 = 0xff;
let Hexadecimal2 = 0xff;
//8진법
let octal = 0o377;
//2진법
let binary = 0b11111111;
console.log(decimal);
console.log(Hexadecimal1);
console.log(Hexadecimal2);
console.log(octal);
console.log(binary);
/*
출력
255
255
255
255
255
*/
지수 표기법
let decimal = 300000;
let decimal2 = 0.00003;
let indices = 3e5;
let indices2 = 3e-5;
console.log(decimal);
console.log(decimal2);
console.log(indices);
console.log(indices2);
/*
출력
300000
0.00003
300000
0.00003
*/
Tomorrow better than today, Laugh at myself
- 출처 -