Here is an Array var arr = [1, 2, 3],I want to implement an method to observe the array changes.
It likes
arr.on('change', function () {
// to do something
});
It will automatic trigger the 'change' event when I push or delete data from array.
Is it possible? How can I do it?
Thank you