in general, that's about the best you can do.
in the case you cited you can to do a little better if imgToLoad is an integer:
if(imgToLoad>=3 && imgToLoad<=5)
It would be possible to do it like this also:
This is converting both the array and the the integer value of imgToLoad to Strings and checking for imgToLoad's presence in the checkArr (joined) string to which the indexOf method is being applied. A value of -1 returned means it was not found in that string, so if it's not -1 then the value is in there somewhere. In this way you can add items to the checkArr and have the check work in different ways.
Doing checks like this in intensive loops would not be very efficient (it would be better to do it the 'longhand' way), but perhaps it's ok if it's not in a loop.
and you have to be careful with that because checkArr.join() is a string and you're checking for numbers. because you're not typing your variables, as2 will let you get away with this, but that won't work if you type your variables and it won't work in as3 where you are required to type your variables.
kglad is right, I was doing this in a way that makes sense for as2, as well as taking advantage of as2's permissive typing.
In as3, you can use indexOf on an array, so if you are doing this in as3, you can do it like this:
Actually, for the as2 version it would more correctly be written like this:
And for the record, when I mostly wrote as2 (I code mostly as3 now), I would use this type of approach only rarely. Sometimes it could make your code more readable or maintainable, by setting up the checkArr as a configuration 'setting', but for most cases it's probably better to do it longhand (so long as it's not too long)