When invoked with the new operator, the constructor function creates what is known as a prototype for an object; that is, it creates a template from which to build objects of the given kind.
当调用new操作符时,构造函数就为对象创建一个所谓的原型(prototype);也就是说,它创建了一个模板(template),从中构建给定类型的对象。
When invoked with the new operator, the constructor function creates what is known as a prototype for an object; that is, it creates a template from which to build objects of the given kind.
当调用new操作符时,构造函数就为对象创建一个所谓的原型(prototype);也就是说,它创建了一个模板(template),从中构建给定类型的对象。
应用推荐