HTML/Html-Javascript/05-js基础数据类型.html

40 lines
845 B
HTML
Raw Normal View History

2023-05-01 19:37:40 +08:00
<!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>
//字符串
// let str0="xxxx";
// let str1='xxxx';
// let str2=`x xx x`;
// console.log("我是"+"谁"+"?");
// console.log(`你是谁 ${str0} ${"啥"}`);
//数字
//在js 中不区分整型和浮点型
// console.log(123);
// console.log(123.123);
// let n0=999;
// let n1=9.98;
// console.log(typeof no);
//布尔
// console.log(true);
// console.log(false);
//特殊的
// undefined 变量未定义
// null 空值
// NaN 非数字
</script>
</body>
</html>