What's the easiest way to track changes to an object or variable?
There is a global variable in which the object is located. Changes are made to the object from time to time. Can you please tell me what is the easiest way to track the fact that an object has changed? Are there any analogs for addEventListener () that could be applied to variables?
I won't be smart, I haven't done it myself, although I've been programming for a long time.
You need thisAnonymous
You can via ProxyAnonymous
You need to connect either a global storage such as redax, mobix, etc. or write your own, if you need your own bike.
Look towards reactive programmingAdeline Sanders
To place the code, please use CodePen or similar tool. Thanks you!