Many thanks DrAzzy
It would be a nice feature in the espruino enviroment. With getters and setters nice objectoriented implementations could be made like:
mycar.light='on'; // Hidden catch function implements the functionality
If(mycar.ambientsensor<=5) { mycar.light='on'; } // Provided by the hidden getter function, done as above.
Best regards
Sacha
@Sacha started
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.
Many thanks DrAzzy
It would be a nice feature in the espruino enviroment. With getters and setters nice objectoriented implementations could be made like:
mycar.light='on'; // Hidden catch function implements the functionality
If(mycar.ambientsensor<=5) { mycar.light='on'; } // Provided by the hidden getter function, done as above.
Best regards
Sacha