【发布时间】:2011-05-27 10:02:44
【问题描述】:
我问了这个问题:
Why cant I declare a constructor instantiate an object and then access the prototype?
你可以看到我已经标记了答案。我理解回复,但我对他的意思有点困惑:
The prototype belongs to the class, not the instance:
这是否意味着javascript在这个例子中有一个类?我认为javascript是无类的?它只有函数构造函数......函数构造函数在什么时候成为一个类?是当您使用 .prototype 访问器向其中添加其他成员时?
【问题讨论】:
标签: javascript prototype-programming