加载中
for 迭代方式

对象迭代 let key; const o = {a: a, b: b}; for (key of Object.keys(o)) { console.log(key + ": " + o[key]); } 数组迭代 let n; const nodes = [1,2,3]; for (n of Array.from(nodes...

2017/05/18 11:23
21
构建Class

构建class class Uwo { // 构造方法 constructor(options) { this.options = options; } } 继承class class UwoItem extends Uwo { // 构造方法 constructor(...

2017/04/24 09:48
34
let 与 const 生命变量

let实际上为JavaScript新增了块级作用域。 { let a = 10; var b = 1; } a // ReferenceError: a is not defined. b // 1 let不允许在相同作用域内,重复声明同一个变量。 // 报错 func...

2016/09/19 15:17
114

没有更多内容

加载失败,请刷新页面

没有更多内容

返回顶部
顶部