Skip to content

Commit f652b9d

Browse files
authored
Merge pull request #944 from david-cho-lerat-HL2/patch-2
Update article.md
2 parents 076a624 + 3b20808 commit f652b9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: 1-js/09-classes/01-class/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ alert(typeof User); // function
8686

8787
What `class User {...}` construct really does is:
8888
1. Creates a function named `User`, that becomes the result of the class declaration.
89-
- The function code is taken from the `constructor` method (assumed empty is we don't write such method).
89+
- The function code is taken from the `constructor` method (assumed empty if we don't write such method).
9090
3. Stores all methods, such as `sayHi`, in `User.prototype`.
9191

9292
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.

0 commit comments

Comments
 (0)