반응형
*typeof - 지정 데이터나 변수에 저장된 자료형을 알고 싶을 때 사용.
var a = 99;
var b = "문자";
var c = true;
document.write(typeof a);
document.write(typeof b);
document.write(typeof c);
값
a - number
b - string
c - boolean
반응형
'참고 > JAVASCRIPT' 카테고리의 다른 글
confirm (0) | 2020.05.13 |
---|---|
테이블 짜기 (0) | 2020.05.13 |
반복문 - 중첩, break, continue (0) | 2020.05.11 |
debug (0) | 2020.05.07 |
while , do while 반복문 (0) | 2020.05.07 |
댓글