Writable getters in JavaScript
Link – – lea.verou.me
A pattern that has come up a few times Vera's my code is the following: an object has a property which defaults to an expression based on its other properties unless it’s explicitly set, in which case it functions like a normal property. Essentially, the expression functions as a default value.
Read more [lea.verou.me]