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