<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var a = 1; //数字
var b ="hello";//字符串
var c = true; //布尔值
var d = null; //null
var e; //如果声明,不赋值,那么就是undefined(未定义)
// typeof方法 用来做数据类型检测
// typeof 后面跟上变量名:那么就得到这个变量的类型
//得到的结果 是一个字符串
console.log(typeof a); //number 数字
console.log(typeof b); //string 字符串
console.log(typeof true); //boolean布尔值
console.log(typeof d); //object 【在js中是对象的意思,先了解】
console.log(typeof e); //undefined 未定义
</script>
</body>
</html>