You said you can do it with a loop. So you should know how to check only the second element of an array instead of using include which checks all elements. Same for car type.
const cars = [
["honda", "red", 1977, "USD 15k"],
["honda", "blue", 2004, "USD 14k"],
["Volkswagen", "blue", 2005, "USD 22k"],
["Volkswagen", "grey", 2012, "USD 30k"],
["Dodge", "yellow", 1985, "USD 10k"],
];
const findCar = function (make, colour, cars = []) {
// convert given properties to match into lower case
const targetMake = make.toLowerCase()
const targetColour = colour.toLowerCase()
return cars.some((car) => {
// assign first two indexes to variables in lower case
const carMake = car[0].toLowerCase()
const carColour = car[1].toLowerCase()
return carMake === targetMake && carColour === targetColour
})
}
console.log(findCar("honda", "red", cars)) // true
console.log(findCar("honda", "green", cars)) // false
console.log(findCar("dodge", "yellow", cars)) // true
console.log(findCar("Volkswagen", "red", cars)) // false
You will see I have also made use of toLowerCase as the source data and maybe the values being used to find a match are inconsistent e.g. honda, Volkswagen
Note: It would be nicer to work with if your data made use of objects e.g. it came in a JSON format like this