diff --git a/1-js/09-classes/01-class/article.md b/1-js/09-classes/01-class/article.md index 4aaf52bd..3f15760b 100644 --- a/1-js/09-classes/01-class/article.md +++ b/1-js/09-classes/01-class/article.md @@ -318,6 +318,9 @@ class User { } new User().sayHi(); + +alert(User.prototype.sayHi); // placed in User.prototype +alert(User.prototype.name); // undefined, not placed in User.prototype ``` The property `name` is not placed into `User.prototype`. Instead, it is created by `new` before calling the constructor, it's a property of the object itself.