DEV Community

Discussion on: What Javascript features are the most confusing to you?

Collapse
 
pris_stratton profile image
pris stratton

Yeah I think the time I saw them used that made sense was in the O’Reilly book Learning JavaScript where they were used to prevent an object property being accessed directly - they’d have to be accessed using get or set methods instead. But I think there are easier ways to achieve this like proxies.