In javascript I am doing the following which works fine.
if (myVar == 25 || myVar == 26 || myVar == 27 || myVar == 28) { //do something }
Just try with:
if ( [25, 26, 27, 28].indexOf(myVar) > -1 ) {}