From 34b51dc7ec5106fc6c23c0c02df3d578226d9a35 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Thu, 18 Jul 2019 19:49:48 +0300 Subject: [PATCH] minor --- 1-js/09-classes/01-class/article.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/1-js/09-classes/01-class/article.md b/1-js/09-classes/01-class/article.md index 6f494f94..94bcf7c5 100644 --- a/1-js/09-classes/01-class/article.md +++ b/1-js/09-classes/01-class/article.md @@ -87,9 +87,9 @@ alert(typeof User); // function What `class User {...}` construct really does is: 1. Creates a function named `User`, that becomes the result of the class declaration. The function code is taken from the `constructor` method (assumed empty if we don't write such method). -2. Stores all methods, such as `sayHi`, in `User.prototype`. +2. Stores class methods, such as `sayHi`, in `User.prototype`. -Afterwards, for new objects, when we call a method, it's taken from the prototype, just as described in the chapter . So a `new User` object has access to class methods. +Afterwards, for `new User` objects, when we call a method, it's taken from the prototype, just as described in the chapter . So the object has access to class methods. We can illustrate the result of `class User` declaration as: @@ -97,7 +97,6 @@ We can illustrate the result of `class User` declaration as: Here's the code to introspect it: - ```js run class User { constructor(name) { this.name = name; }