indexof arr code example
Example: JavaScript Array Methods indexOf()
let days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'];
console.log(days.indexOf('Sunday'));
// --> -1, mert nem található meg
let days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'];
console.log(days.indexOf('Monday'));
// --> 0