An index of 0 is falsy, so a match at the front is reported as missing.
Acceptance criteria
- 1.#out should show found it.
An index of 0 is falsy, so a match at the front is reported as missing.
const fruits = ["Apple", "Banana"]; document.querySelector('#out').textContent = fruits.indexOf("Apple") ? "found it" : "not found";
Output ready when you are
Press Run to render your code, or Submit to validate your solution.