Well, the only thing that I can tell you about are getters:(好吧,我唯一能告诉您的就是吸气剂:)
var foo = { a: 5, b: 6, get c() { return this.a + this.b; } } console.log(foo.c) // 11
This is a syntactic extension introduced by the ECMAScript 5th Edition Specification, the syntax is supported by most modern browsers (including IE9).(这是ECMAScript 5th Edition规范引入的语法扩展,大多数现代浏览器(包括IE9)都支持该语法。) 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…