<!DOCTYPE html>charset="utf-8"W3Cschool教程(w3cschool.cn)typeof 操作符返回变量、对象、函数、表达式的类型。id="demo"document.getElementById("demo").innerHTML =typeof "john" + "<br>" +typeof 3.14 + "<br>" +typeof NaN + "<br>" +typeof false + "<br>" +typeof [1,2,3,4] + "<br>" +typeof {name:'john', age:34} + "<br>" +typeof new Date() + "<br>" +typeof function () {} + "<br>" +typeof myCar + "<br>" +typeof null;