typeof undefined; undefined
typeof true; boolean
typeof 'string'; string
typeof 123; number
typeof 9007199254740992n; bigint
typeof Symbol(); symbol
typeof null; object
typeof 를 통하여 원시값 확인가능
biginit 은 숫자의 최댓 값을 초과한 값
null 은 원시 값이지만 object로 표기되는 오류가 있다.
let test = 'string';
test.toUpperCase();
console.log('string'.toUpperCase()); STRING
console.log(test); string
const bool = false;
!bool;
console.log(bool); false
원시 값은 불변한다.
undefined & null (0) | 2022.05.23 |
---|---|
참조 타입 (0) | 2022.05.23 |
use strict (0) | 2022.05.22 |
리터럴 (0) | 2022.05.22 |
식별자 (0) | 2022.05.22 |
댓글 영역