For instance, a variable named arrayElements of array type contains [1,2,3,4].
How do i get the position of which that has the value \"3\" in the array variable besi
consider using indexOf, it returns the 0-based position of the element in the array.
indexOf
e.g.
[1,2,3,4].indexOf(3); // produces 2
Note that this method is not available in IE 8 and below.