当前位置:首页 > 2018年11月

es6 promise

自由小鸟5年前 (2018-11-25)ES63556
1,promise中then的使用function runAsync1(){    var p=new Promise(function(resolve,reject){       &nb...

代理事件绑定

自由小鸟5年前 (2018-11-19)javascript2772
代理事件绑定
 代理绑定事件通用绑定事件的函数...

数组api

自由小鸟5年前 (2018-11-15)http2623
数组api
1,forEachvar arr=[1,2,3];arr.forEach(function(item,index){  consoel.log(index,item)})2,every 判断所有元素都满足一个条件var arr=[1,2,3,4,5]var result=arr.every...

异步和单线程

自由小鸟5年前 (2018-11-15)http2554
console.log(100);setTimeout(function(){    consoel.log(200)})consoel.log(300);//100  300  200执行第一行,打印100执行setTimeout后,传入...

实际开发中闭包的应用

自由小鸟5年前 (2018-11-15)http2654
//闭包实际应用中主要用于封装变量,收敛权限function isFirstLoad(){    var _list=[];   return function(id){      if (_list.inde...

函数作用域

自由小鸟5年前 (2018-11-15)http2588
函数作用域是在函数定义时决定1,函数作为返回值找自由变量就是从定义作用域开始往上找起例如:function F1(){ var a=100; return function(){   console.log(a) }}var f1=F1();var...

this指向

自由小鸟5年前 (2018-11-06)javascript2451
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 19.0px; font: 13.0px 'Helvetica Neue'; color: #000000}es5 中 this指向该函数被调用的对象es6 中箭头函数的this指向是定义时的对象...

this指向

自由小鸟5年前 (2018-11-06)javascript2228
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 19.0px; font: 13.0px 'Helvetica Neue'; color: #000000}es5 中 this指向该函数被调用的对象es6 中箭头函数的this指向是定义时的对象...