Fix a typo

This commit is contained in:
K-Sato 2019-06-26 13:17:44 +09:00 committed by GitHub
parent 4f2a90854d
commit fe2bface6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,7 +89,7 @@ What `class User {...}` construct really does is:
- The function code is taken from the `constructor` method (assumed empty if we don't write such method). - The function code is taken from the `constructor` method (assumed empty if we don't write such method).
3. Stores all methods, such as `sayHi`, in `User.prototype`. 3. Stores all 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 <info:function-prototype>. So `new User` object has access to class methods. Afterwards, for new objects, when we call a method, it's taken from the prototype, just as described in the chapter <info:function-prototype>. So a `new User` object has access to class methods.
We can illustrate the result of `class User` declaration as: We can illustrate the result of `class User` declaration as: