I have an assignment that requires me to filter an array into a new array for a vehicle with the term "ford" in it. The format should be in ES6 using arrow function syntax, like this:
const arr = [
{name: "Honda", type: "Accord"},
{name: "ford", type: "fusion"},
{name: "Toyota", type: "Camry"}
]
const newArr = [...arr].filter(value => value === 'ford');
console.log(newArr);
I understand that this example is incorrect and would not actually return the name of the vehicle with "ford" in it, but I am just trying to show how they want it formatted.