Small Grammatical Error

This commit is contained in:
Alex Miget 2019-03-30 12:50:22 -05:00 committed by GitHub
parent 706b1f26b2
commit a9fb7799e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,7 +47,7 @@ It's easy to see that these two examples are alike. Be sure to note that methods
So, what exactly is a `class`? We may think that it defines a new language-level entity, but that would be wrong. So, what exactly is a `class`? We may think that it defines a new language-level entity, but that would be wrong.
In Javascript, a class is a kind of a function. In Javascript, a class is a kind of function.
The definition `class User {...}` creates a function under the same name and puts the methods into `User.prototype`. So the structure is similar. The definition `class User {...}` creates a function under the same name and puts the methods into `User.prototype`. So the structure is similar.