About Lesson
IndexOf Array:
The indexOf() method is used to find the index of the first occurrence of the search element provided as the argument to the method.
Example:
var x = [“Ram”, “Arman”, “Raghav”, “Manav”];
indexOf(“Search item”, start);
LastIndexOf Array:
The lastIndexOf() method is used to find the index of the last occurrence of the search element provided as the argument to the function.
Example:
var x = [“Ram”, “Arman”, “Raghav“, “Manav”];
lastIndexOf(“Search item”, end);