What will be the result of the following code?
const cars = [
{ brand: 'Toyota', model: 'Corolla' },
{ brand: 'Ford', model: 'Focus' }
];
const filtered = cars.filter(car => car.brand === 'Toyota');
console.log(filtered.length);
What will be the result of the following code?
const cars = [
{ brand: 'Toyota', model: 'Corolla' },
{ brand: 'Ford', model: 'Focus' }
];
const filtered = cars.filter(car => car.brand === 'Toyota');
console.log(filtered.length);