第二天
This commit is contained in:
38
02. 前端Web基础(JS+Vue+Ajax)/JS-Vue/03. JS-数据类型.html
Normal file
38
02. 前端Web基础(JS+Vue+Ajax)/JS-Vue/03. JS-数据类型.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user