closes #2524
This commit is contained in:
parent
b2bff50f56
commit
7b76185892
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ alert(typeof User); // function
|
|||
alert(User === User.prototype.constructor); // true
|
||||
|
||||
// The methods are in User.prototype, e.g:
|
||||
alert(User.prototype.sayHi); // alert(this.name);
|
||||
alert(User.prototype.sayHi); // the code of the sayHi method
|
||||
|
||||
// there are exactly two methods in the prototype
|
||||
alert(Object.getOwnPropertyNames(User.prototype)); // constructor, sayHi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue