장바구니에 상품이 없습니다.
home2 › 게시판 › JavaScript, TS 게시판 › string typeof 결과
var str = 'test'
console.log(typeof str)
하면 string으로 나오는데 결국 str도 String이라는 constructor로 만들어진 오브젝트 아닌가요?
근데 왜 string으로 나오는지 잘 모르겠습니다. 그냥 String이라는 constructor로 만들어진 오브젝트는
string이라는 타입으로 표시한다고 정해진건가요?
네 문자로 출력해주는 문법이라 그렇습니다