I guess in the BgColor example, I'd say why not use an actual variable?
But in general if you do want to do this (writable/readable) you can use jswrap_object_defineProperty as you say - but I think you'd have to make your code add the properties to the object when it was created (the 'jswrapper' stuff won't handle that for you).
Following API-description for Object.defineProperty, writeable and get/set are not supported.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I guess in the BgColor example, I'd say why not use an actual variable?
But in general if you do want to do this (writable/readable) you can use jswrap_object_defineProperty as you say - but I think you'd have to make your code add the properties to the object when it was created (the 'jswrapper' stuff won't handle that for you).
Where does it say that? Seems to say it's ok here: http://www.espruino.com/Reference#l_Object_defineProperty