number = 0; up_btn.onPress = function () { num.text = ++number; }; down_btn.onPress = function () { num.text = --number; };