Hi everyone. I wanted to know if there is a better way to do this:
if (var == 'A' || var == 'B' || var == 'C' || var == 'D')
I find it very annoying and repetitive to have to compare the same variable multiple times and have to write down the same thing over and over again.
I tried this out but apparently it doesn't work:
if (var == ('A' || 'B' || 'C' || 'D'))