Write Your JavaScript Code Here

// Array :- It is collection more the single value inside an variable // findIndex():- Return the index of first element that satify the condition if element is not present it will return -1 // Array.findIndex(callback(value.index,arr),thisArg) const arr1=[1,2,3,4,1,4,3]; const val = arr1.findIndex(x => x==4); console.log(val); console.log(arr1.findIndex(x => x>1));

Output: