Files
ClassContent/历届学生/18课程/class18/课程/2020-10-19/index.html
2024-09-27 02:06:13 +08:00

71 lines
1.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>
</body>
<script>
// 变量 数值可以被改变的
// var let
// var 刘兵 = "111"
// var A = "111"
// var w3fervre = "111"
// var A ="1", w3fervre = ""
// console.log(刘兵);
// var c;
// console.log(c);
// 变量命名规则
// 中文可以,但是项目不能去使用
// 变量名不可以使用特殊符号 _ $
// 区分大小写
// 不能以数字和特殊符号开头 _ $
// 变量数据类型
// string , number, booleantrue 1, false 0,Null, Undefined, Symbol
// 对象(Object)、数组(Array)、函数(Function) 留坑
var a = 1, b = 2;
// console.log(a++); // 1
// console.log(a); // 2
// console.log(++a); // 3
console.log(false && true); // false
// && 条件表达式两边必须为true返回true只要有一个为flase那么为false
// 变量++ ++ 在后面,先运行代码,然后再让变量+1
// ++变量 ++ 在前面,先让变量+1然后运行代码
// console.log( (--a)-(a++) + (b--) + (++a)-1 ); // 0 0 2 /
// = 赋值
// == 比较相等(数值)
// === 比较相等(数值和数据类型) 强等于、
// console.log(a+=1);
// a*=b // a = a*b
// + 数学运算 加法
// + 拼接字符串
//
// console.log(1-"nihao"); // 12
// 数据类型相互转换
// "2" ---> 2
// typeof 变量名
// 常量
</script>
</html>