Does Javascript have get/set keywords like C#?
I'm working with XULRunner and came across the following pattern in a code sample: var StrangeSample = { backingStore : "", get foo() { return this.backingStore + " "; }, set foo(val) { this.backingStore = val; }, func: function(someParam) { return this.foo + someParam; } }; StrangeSample.foo = "rabbit"; alert(StrangeSample.func("bear")); This results in "rabbit bear" being alerted. I've never seen this get/set pattern used in Javascript before. It works, but I can't find any documentation/reference for it. Is this something peculiar to XUL, a recent language feature, or just something I