Closed erikvold closed 8 years ago
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set
Try on example {set foo(v) {}}, it fails.
{set foo(v) {}}
Well, that's is incorrect syntax, while from you link, for the case -
var o = { set current (str) { this.log[this.log.length] = str; }, log: [] }
I don't see any errors, which is what to be expected?
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set
Try on example
{set foo(v) {}}
, it fails.