Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions 1-js/09-classes/01-class/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,9 @@ Such features are easy to remember, as they resemble that of literal objects.

## Class fields

```warn header="Old browsers may need a polyfill"
Class fields are a recent addition to the language.
```

Previously, our classes only had methods.
Class fields are a standard part of the language and are supported in modern browsers.

"Class fields" is a syntax that allows to add any properties.
They provide a clean syntax for declaring properties directly inside the class body, without placing them inside the constructor.

For instance, let's add `name` property to `class User`:

Expand Down