js基础语法

76 阅读1分钟

数组

push

pop

unshft

shift

slice

splice

rwverse

sort

concat

join

map

fiter

indexOf

innclude

every

some

find

findindex

reduce

数组的排序

冒泡排序

选择顺序

数组去重

indexOf/includes

对象

set

sort单层循环

嵌套循环

JSON

用于前后端交互

字符串

字符串方法

split

replace/replaceAll

toUppcase/toLowerCase

substing/slicee/substr

concat

trim

Math

Math.random()

Math.flioor()/ceil()/round()

Math.sqrt()

Math.min()/max()

Math.pow()

Math.abs()

Date

new Date()/new Date(参数)

get开头方法

set开头方法

定时器和延时器

异步方法:先执行同步后执行异步

Bom

nacigator.userAgent

location.hrref/location.reloed()location.srarch/location.hash

confitm/prompt/alet------返回值

history.go()/back()/alert

scrolltop/clientwidth/HEight

DOM

取--------querySelector/querySerctorALL

增--------createElenment

改--------replaceChid()

删--------remove()/remocveChild()

属性节点

get Attridute()

setAttibute()

removeAttibute()

DOM对象距离属性

offsetwidth

clentWifth

offsretLeft

事件

事件对象------e------e.pageX/e.offsetX/e.cilentX/e.stopPropagation()/e.preventDefsult()

事件流

事件捕获

事件源

事件委托

addEventListsner()

正则表达式

两个方法

几个元字符

ES6+

不能重读声明变量

没有变量提升

结构赋值

import{a,b}from

function fn ({a,b}){} fn({a:1,b:2})

模版字符串

扩展运算符

set/map

peoxy

promise

面向对象

构造函数

原型对象

前后端交互

ajax