Write Your JavaScript Code Here

// Array :- It is collection more the single value inside an variable // indexOf(): used to search the method and return the value . This method is case sensitive arr1=[1,2,3,4,5]; let n=arr1.indexOf(2); console.log(n); console.log(arr1.indexOf(-1));

Output: