`value.substr(-1)` is shorter than `value[value.length - 1]`