var value = 0;
function valueChangeSubscriber() {
console.log(value)
}
value = 1
// 1
// undefined
value = 3
// 3
// undefined
var value = 0;
var old-value = value;
function oldornot(new-value) {
value = new-value;
if new-value == old-value {
echo "Not changed";
}
else {
echo "Changed";
old-value = new-value;
}
oldornot(59)
// Changed
oldornot(59)
// Not changed