javascript - Compress If Conditions

问题描述:

Is there such a way to compress a block of conditions in an if statement?

As you can see from the code, itemKey is a variable. I set the first letter to be lowercased so I can match it to another variable letter. The below works perfectly, but I would like to clean it up. Can I somehow pull all the || after the && together to encompass all number 0-9? This is acting as a string, not integer.