Skip to content

Instantly share code, notes, and snippets.

@ABIDULLAH786
Created August 5, 2023 16:10
const numbers = [1, 5, 8, 10, 13];
const index = numbers.findIndex(num => num > 8);
console.log(index); // Output: 3 (index of the first element greater than 8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment