Let's say I have 2 handlers increment_click and decrement_click which calls common method
In real my method can be much more complex and I'd like to avoid to use syntax like with if
if (operator == "+") {
return value = value + step
}
else {
return value = value - step
}
and do something more generic like this
increment(value, operator, step) {
return value = value <operator> step
}
Is it somehow possible ?