Room.prototype in these examples. The name of the property you are adding. 'sources' in these examples but it could be anything like 'foo' or 'myProp'. An object containing options that define how the property behaves. See the MDN documentation for a list of all possible options. Object...
must be taken before overwritingObject.prototype: otherwise it might break all code that does not check for hasOwnProperty(). SeeMDN help. In this library all extensions are done usingObject.defineProperty()which does not pollute objects as the new properties are not enumerable. Again, seeMDN ...
'myExample.#somePrivateMethod();// SyntaxError 技能测试! 你已经看到了本文的结尾,但你还记得本文的绝大多数重要的信息吗?在继续学习新的内容之前,你可以找一些进一步的测验来验证你已经掌握了这些信息——参见技能测试:面向对象的 JavaScript。