随笔分类 - JS
摘要:示例数组创建 let fruits = ['Apple', 'Banana'] console.log(fruits.length) // 2 循环访问数组forEach fruits.forEach(function(item, index, array) { console.log(item,
阅读全文
摘要:这2者都可以批量身上对象 类是ES6新增的语法 但它本质上还是通过构造函数实现的 在类中我们新增了constuctor super关键字 constructor可以挂载实例的属性 super可以用来继承父类的成员 类不能当做普通函数执行 必须配合new使用 构造函数可以作为普通函数执行也可以配合ne
阅读全文

浙公网安备 33010602011771号