A ticket-price list raises two questions: which price first passes a threshold, and is a particular price present? Use find() and includes() in script.js.
Search methods answer slightly different questions. This lesson pairs find() with includes() so learners practice both finding a matching item and checking simple membership.
const loans = ["on time", "overdue", "returned"];
const catalog = ["North Wind", "Sunset", "Rain"];
console.log(loans.find((loan) => loan === "overdue"));
console.log(catalog.includes("Sunset"));
hasForty with includes(40); the supplied probe prints 75 | true.Use find() when you want the matching value itself.
Use includes() when you only need a true-or-false answer.