2021-05-11 11:33:55 +08:00

48 lines
1.0 KiB
Markdown
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.

# 数组
## 复习
运算符
js 简介
数据类型
### js 简介
ECMAScript(核心 规定js的基本语法...) dom(文档对象模型 操作dom节点 在页面上的动画效果) bom浏览器对象模型 记录浏览器信息)
bom
window //全局对象
location url信息
navigator 浏览器信息
screen 屏幕信息
history 读取浏览器历史记录
### 数据类型
简单数据类型String Number Boolean null undefined
复杂数据类型 object (function array都是object的实例 )
var arr=[]
var arr= new Array()
区别
检测数据类型
instanceof
typeof
<!-- object.prototype.string.call -->
instanceof 返回的是true false
typeof 返回的是数据类型
变量 命名规则
运算符 优先级
括号〉一元运算〉乘除取余〉加减运算〉相等〉与或非〉赋值〉逗号
var a=1b=2,c=3
# 数组array
一组数据的集合
数组内的元素包含在[]内部,以键值对存储
[1,2,3,4]
[
0 => 1
1 => 2
2 => 3
3 => 4
]