3 ms·
However, in JS they have a specific [read, established] meaning, in the OOP sense. [It's a term established in the language specification.]
by masswerk 8y ago
However, in JS they have a specific [read, established] meaning, in the OOP sense.
[It's a term established in the language specification.]
- ponyfleisch 8y ago> [It's a term established in the language specification.] I'd say JS getters/setters are syntactic sugar for the OOP concept the author is talking about.
- masswerk 8y agoIt's the main mechanism in JS to define functional accessors, at least since ECMA-Script 3. Before this, the terms have been used loosely, as well, for explicit accessor methods (like in Java). [Edit] Correction: should have been, at least since ECMA-262 5th Ed.