6
这是有效的Javascript语法吗?它有什么作用?Javascript原型语法
Parser.prototype = {
// ...
get currentState() {
return this.state[this.state.length - 1];
},
// ...
}
请参阅https://github.com/LearnBoost/stylus/blob/master/lib/parser.js。
谢谢!
它在ECMAScript 5中引入,IE9是第一个带有功能ES5引擎的浏览器。 – user123444555621 2011-02-13 11:34:14