जहाँ हमें किसी specific value को search कर के उसके first index (position ) को पता करना होता है , तब हम indexof() Method करते हैं
<script>
//Default या widthout start value
var a = ["Apple", "Mango", "Banana", "Mango", "Grapes"];
var b = a.indexOf("Mango");
document.write(b);
</script>
<script>
//width start value
var a = ["Apple", "Mango", "Banana", "Mango", "Grapes"];
var b = a.indexOf("Mango", 2);
document.write(b);
</script>