Glossary: JavaScript Beyond the Basics
toJSON
A method a class can define to control its own JSON. `JSON.stringify` calls it and uses whatever it returns, which is how `LoyaltyAccount` saves its private history.
Glossary: JavaScript Beyond the Basics
A method a class can define to control its own JSON. `JSON.stringify` calls it and uses whatever it returns, which is how `LoyaltyAccount` saves its private history.