In Ecma6, it is now easy to observe changes in Object thanks to Proxy
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy
I am looking for a way to observe any variable (not only object, but also int, String..)
ex:
let s = "hello";
s = "world"; // should trigger an event when telling me that s has changed
let x=1;
x = 2; //should trigger an event when telling me that x has changed
let o = {"foo":"bar};
o.foo = "bar2"; //should trigger an event when telling me that o has changed
Found some clues with defineProperty, but was unable to apply that to "let" variables