An object literal can also contain getters
- just prefix the property with
get
(and make it a function) - must have NO parameters
- can be a computed property (an expression enclosed in
[]
) - can be removed using delete
Links
Description of all the details of a getter.
"An accessor property associates a key value with one or two accessor functions ..."
Announcement of this kata on twitter.