PatrickLewis
01-09-2003, 10:27 AM
Is there a way to check if something is an element in an array?
Say:
a=4;
b= new Array(1,2,3,4,5,6);
Can i do something like:
if (a.elementOf(b)) {do this}
with out having to do a loop to check each element of the array?
Say:
a=4;
b= new Array(1,2,3,4,5,6);
Can i do something like:
if (a.elementOf(b)) {do this}
with out having to do a loop to check each element of the array?