angular index of array

JavaScript
var fruits = ["Banana", "Orange", "Apple", "Mango"];

var a = fruits.indexOf("Apple");
 
Source

Also in JavaScript: