점검
<script>
/*
[문제]
아래 출력의 결과를 예측하시오.
[보기]
false
-4
true
"hi"
10.333
*/
document.write(typeof false, "<br>");
document.write(typeof -4, "<br>");
document.write(typeof true, "<br>");
document.write(typeof "hi", "<br>");
document.write(typeof 10.333, "<br>");
</script>
HTML
복사
정답
<script>
/*
[문제]
아래 출력의 결과를 예측하시오.
[보기]
false
-4
true
"hi"
10.333
[출력예시]
boolean
number
boolean
string
number
*/
document.write(typeof false, "<br>");
document.write(typeof -4, "<br>");
document.write(typeof true, "<br>");
document.write(typeof "hi", "<br>");
document.write(typeof 10.333, "<br>");
</script>
HTML
복사