I need to check if a button tab is between 91 and 96 inclusive.
I don't want to write:
if (button.tab==91) {
...
}
if (button.tab==92) {
开发者_Python百科 ...
}
...
Instead, I want to use a single condition.
How can I do this?
if (button.tab >= 91 && button.tab <= 96)
{
// do stuff!
}
精彩评论