JavaScript For Beginners #33 | How to Find() An Item In Array

Опубликовано: 16 Май 2026
на канале: Dev Diva
11
1

📚 Watch the full JavaScript For Beginners course here:    • JavaScript For Beginners | Full Tutorial  

00:00 - How to find items in array
00:25 - indexOf() method
01:29 - includes() method
02:11 - Exercise
02:28 - Example solution

📚 Resources:
Source code: https://github.com/devdivatutorials/j...

Find: Exercise
1. Declare an array with a list of items: _milk_, _bread_, _butter_.
2. Check if bread is in the array.
3. Find the index of _butter_.
4. Check if cheese is in the array. If not, add it to the array
5. Find the index of _milk_.

📚 CSS & HTML For Beginners full course:    • HTML & CSS for Beginners