js--小结⑥---typeof

时间:2021-02-26 07:04:45
 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<p>typeof操作符返回变量或者表达式的类型</p>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML=
typeof "john"+"<br />"+
typeof "3.14"+"<br />"+
typeof false+"<br />"+
typeof [1,2,3,4]+"<br />"+
typeof{name:' john',age:34}; </script>
</body>
</html>

js--小结⑥---typeof