Public fields are a JavaScript language feature that's used in classes.
```
class Car {
make = "Ford";
model = "Prefect";
wheels = [0, 0, 0, 0]
}
let myCar = new Car; // {make: "Ford", model: "Prefect", wheels: [0, 0, 0 ,0]}
```
We implement only the *public* fields described in this [proposed specification](https://github.com/tc39/proposal-class-fields). No private fields yet.
Bug 1555464 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Public fields are a JavaScript language feature that's used in classes.
```
class Car {
make = "Ford";
model = "Prefect";
wheels = [0, 0, 0, 0]
}
let myCar = new Car; // {make: "Ford", model: "Prefect", wheels: [0, 0, 0, 0]}
```
We implement only the *public* fields described in this [proposed specification](https://github.com/tc39/proposal-class-fields). No private fields yet.
Public fields are a JavaScript language feature that's used in classes.
```
class Car {
make = "Ford";
model = "Prefect";
wheels = [0, 0, 0, 0];
}
let myCar = new Car; // {make: "Ford", model: "Prefect", wheels: [0, 0, 0, 0]}
```
We implement only the *public* fields described in this [proposed specification](https://github.com/tc39/proposal-class-fields). No private fields yet.