typeof 'Hello world!'
typeof 123
typeof true
typeof undefined
typeof null
typeof {}
typeof []
결과
string
number
boolean
undefined
object
object
object
typeof {데이터}
로는 null
과 []
는 obejct로 나옵니다.Object.prototype.toString.call(data).slice(8, -1)
null
, []
도 Null
, Array
로 제대로 출력됩니다. npm init -y
: 프로젝트 관리 시작합니다.npm install parcel-bundler -D
개발의존성으로 parcel-bundler를 설치합니다.npm run dev
: 개발서버를 엽니다.