es6语法

https://segmentfault.com/a/1190000012755430
https://segmentfault.com/a/1190000013052997

解构赋值:【a,b,c】=[1,2,3]
let name={hh:1,gg:2}
let{n,h}=name

promise

let a=10
let promise=new Promise(resolve,reject){
if(a=10){
resolve('222')
}else{
reject("5555")
}
}

promise.then(res=>{
console.log(res)
}.err=>{
console.log(err!)
)
}
)

posted @ 2020-02-19 10:21  木头小屋  阅读(98)  评论(0编辑  收藏  举报