Welcome to day 5 of 7 Days of JavaScript! Today we will code a classic function that:
- Takes two parameters: an element and an array of elements
- Returns the position of the element inside the array. If the element is not in the array, returns -1.
Wish you luck!
You can see the solution here.
Top comments (2)
Recursive solution with runtime type checking.
Woah, interesting...