Rick Waldron wrote:
I think the colon was just a typo

Dave is not cc'ed and may have missed the responses going back to Tab's first one, but I think there was no typo. Dave's example:

    box = {
        _value: 0,
        get: () ->  this._value,
        set(v) { this._value = v }
    }


Yes, it's awkward as examples go because get and set are contextual keywords, but this shows them used as plain identifiers. This also shows -> as property value in an object literal (for property name 'get'), well as method definition shorthand (for 'set'), to contrast the two styles.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to