Goal:
1) Retrieve the internal contents of an instantiated class
2) Modify the internal value and retain through subsequent retrieval attempts
The MDN example works using the Json object notation form. When I attempt to use a class however, I'm greeted with either function not found or undefined
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.
Mon 2018.09.17
Goal:
1) Retrieve the internal contents of an instantiated class
2) Modify the internal value and retain through subsequent retrieval attempts
The MDN example works using the Json object notation form. When I attempt to use a class however, I'm greeted with either function not found or undefined
The constructor seems to ignore the initial default assignment - why not -1
Then if I use a setter, then it's not clear if the constructor initialized correctly
If I use the () notation - so which is correct, without the () or using the () ?
How can function getX() not be found when it is clearly defined?
Following the example from MDN, and applying to this class
VERSION 1v99
1 Attachment