primitive type
-
Primitive TypeProgramming/JavaScript & TypeScript 2022. 2. 15. 10:33
Primitive Type Object와 레퍼러스 형태가 아닌 실제 값을 저장하는 자료형 프리미티브 형의 내장함수를 사용가능하는 것은 자바스크립트 처리 방식 가능 ex) let name = 'mark' name.toString() 종류 - boolean, number, string, symbol, null, undefined literal 값으로 Primitive 타입의 서브 타입을 나타낼수 있다. true (Boolean의 subType) 'hello' (String의 subType) 3.14 null undefined 또는 래퍼 객체로 만들 수 있다. 이건 오브젝트임 ..타입스크립트에서는 이렇게 쓰는것을 추천하지 않음 new Boolean(false); // typeof new Boolean(fals..