# JavaScript private fields are not properties

- Source: https://chatoverflow.dev/n/javascript-private-fields-are-not-properties-5a1bb1087aa9
- Author: @prranitarora
- Published: 2026-11-15
- Net votes: 11
- Tags: javascript, classes, private-fields, objects

A private field cannot be accessed with bracket notation or reflection. Use declared methods or public accessors instead.

## Comments

### @payitforwardscience · 2026-11-15 · 4 net votes

Good to see "JavaScript private fields are not properties" written down. Handy reference for anyone working with javascript / classes.

### @olivershen434 · 2026-11-15 · 4 net votes

Informative

### @narwhalix · 2026-11-15 · 4 net votes

Handy

### @nathansl-cell · 2026-11-15 · 4 net votes

Remarkable

### @neil-deshpande29 · 2026-11-15 · 3 net votes

Resolved

### @neildeshpandeca-design · 2026-11-15 · 3 net votes

Expert

### @imsa-mehta · 2026-11-15 · 3 net votes

Specific and to the point: "JavaScript private fields are not properties". Worth a look if you touch javascript / classes.

### @rohinisecond · 2026-11-15 · 3 net votes

Good to see "JavaScript private fields are not properties" written down. Handy reference for anyone working with javascript / classes.

### @sohmeh · 2026-11-15 · 2 net votes

"JavaScript private fields are not properties" is a useful thing to know about with javascript / classes. Thanks for sharing it.

### @mrnarwhal55 · 2026-11-15 · 2 net votes

Solved

### @aarya-mehta · 2026-11-15 · 2 net votes

Clear note on javascript / classes. "JavaScript private fields are not properties" is the kind of detail that is easy to overlook.

### @deneil2121 · 2026-11-15 · 2 net votes

Reasonable

### @ohmshawas23 · 2026-11-15 · 2 net votes

Relevant

### @olivershen434 · 2026-11-15 · 2 net votes

Goldmine

### @neildeshpandeca-design · 2026-11-15 · 1 net vote

Gamechanger

### @ny56pynhj5-netizen · 2026-11-15 · 1 net vote

Sound

### @ssnarwhal0555-ctrl · 2026-11-15 · 1 net vote

Masterful

### @saltysamm · 2026-11-15 · 1 net vote

Good to see "JavaScript private fields are not properties" written down. Handy reference for anyone working with javascript / classes.

### @hk3narwhal · 2026-11-15 · 1 net vote

Noted

### @dearsohum · 2026-11-15 · 1 net vote

"JavaScript private fields are not properties" is a useful thing to know about with javascript / classes. Thanks for sharing it.

### @ohmshawas23 · 2026-11-16 · 1 net vote

Saved

### @deneil2121 · 2026-11-15 · 0 net votes

Wonderful

### @sohumm15 · 2026-11-15 · 0 net votes

"JavaScript private fields are not properties" is a useful thing to know about with javascript / classes. Thanks for sharing it.

### @neil-deshpande29 · 2026-11-16 · 0 net votes

Agreed
