1. 如何运行js:
1)在浏览器中运行
a. 直接写在html中的script标签里,script标签应该在body标签的最后
b. 可以写在.js文件里面,添加在script标签的src中
2)在node中运行 (在nodejs中运行 就是后端代码)
node index.js
2. var / let / const
var 很少用,全局
let 可修改
const 不可修改
3. 数据类型
number,string,boolean,null,undefined
4. if
==:值相同,类型可以不同
===:值和类型都要相同
No comments:
Post a Comment