an_array.indexOf()?

wxdqz

New Member
How do I get JavaScript to find out which element of an array a certain string is?

I tried:

moves.indexOf(this.id)

but apparently I'm not allowed to do that.

Thanks, Alan.
 
Back
Top