Files
JavaWeb/02. 前端Web基础(JS+Vue+Ajax)/JS-Vue/03. JS-数据类型.html
syx_computer 61ec7c9468 第二天
2025-10-13 10:15:32 +08:00

38 lines
730 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JS-数据类型</title>
</head>
<body>
<script>
//1. 数据类型
// alert(typeof 10);
// alert(typeof 1.5);
// alert(typeof true);
// alert(typeof false);
// alert(typeof "Hello");
// alert(typeof 'JS');
// alert(typeof `JavaScript`);
// alert(typeof null);
// let a ;
// alert(typeof a);
// 2.模板字符串
let name = `小王`;
let age = 18;
console.log(`我是${name},我今年${age}`);
console.log('我是' + name + ',我今年' + age + '岁');
</script>
</body>
</html>