<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>
</title>
</head>
<body>
<script type="text/javascript">
var name ="zhangshan";
console.log(typeof name);
var age =17;
console.log(typeof age);
var bool= false;
console.log(typeof bool);
var arr = [1,2,3];
console.log(typeof arr);
var dict = {"name":"zhangshan","age":11};
console.log(typeof dict);
/*
关键词 typeof 查看 其类型
typeof "jhk" // 返回string
typeof 3.14 // 返回 number
typeof false // 返回 boolean
typeof [1,2,3,4] // 返回数组 是object类型
typeof {name:'jhk',age:34}// 返回对象object类型
*/
<!-- -->
</script>
</body>
</html>