Merge pull request #970 from Zyranivia/patch-2

Added missing punctuation.
This commit is contained in:
Ilya Kantor 2019-05-09 11:07:32 +03:00 committed by GitHub
commit 1a133315ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -168,12 +168,12 @@ Although, there are important differences.
alert(User); // class User { ... }
```
2. Class methods are non-enumerable
2. Class methods are non-enumerable.
A class definition sets `enumerable` flag to `false` for all methods in the `"prototype"`.
That's good, because if we `for..in` over an object, we usually don't want its class methods.
3. Classes always `use strict`
3. Classes always `use strict`.
All code inside the class construct is automatically in strict mode.