小编Bet*_*lis的帖子

Javascript原型语法

这是有效的Javascript语法吗?它有什么作用?

Parser.prototype = {

  // ...

  get currentState() {
    return this.state[this.state.length - 1];
  },

  // ...

}
Run Code Online (Sandbox Code Playgroud)

请参阅https://github.com/LearnBoost/stylus/blob/master/lib/parser.js.

谢谢!

javascript prototype

6
推荐指数
1
解决办法
704
查看次数

标签 统计

javascript ×1

prototype ×1