<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
/* typeof运算符的返回结果是一个字符串,可以使用比较运算符“==”来判断
typeof返回的检测结果是否符合预期
*/
var a='12';
console.log(typeof a=='string');
console.log(typeof a=='number');
</script>
</body>
</html>