Suppose I have an array with the following elements:
thisarray = new Array("this", "that", "theotherthing");
Is it possible to create a conditional statement like this?
if(thisarray[0] == thisvar && thisarray[1] == thisvar && thisarray[2] == thisvar) {
//do something
}
The challenge here is that the length of thisarray may vary. Finding a solution for this problem has left me perplexed. Any assistance on how to achieve this would be greatly appreciated.