2018年6月18日

摘要: promise (ES6) 参数: 1)resolve() 2)reject() async和await await,后面必须是promis对象。 代码: async function dely(){ await new Promise(function(resolve,reject){ setTi 阅读全文
posted @ 2018-06-18 21:42 张大虾丶 阅读(133) 评论(0) 推荐(0) 编辑
 
摘要: ES6新增面向对象的语法 class People{ constructor(name,age){ this.name = name; this.age = age; } intro(){//这是方法 内容 } } //下面是子类 class ChinesePeople extends People 阅读全文
posted @ 2018-06-18 21:41 张大虾丶 阅读(561) 评论(0) 推荐(0) 编辑