less than 1 minute read

typeof 연산자

typeof 는 변수의 데이터 타입을 반환하는 연산자입니다.

typeof (variable)

undefined : 변수가 정의되지 않거나 값이 없을 때 number : 데이터 타입이 수일 때 string : 데이터 타입이 문자열일 때 boolean : 데이터 타입이 불린일 때 object : 데이터 타입이 함수, 배열 등 객체일 때 function : 변수의 값이 함수일 때 symbol : 데이터 타입이 심볼일 때

스크린샷 2020-05-25 오후 10 59 04

Categories:

Updated: