What will be the result of the following code?
const cars = [
{ brand: 'Toyota', model: 'Corolla' },
{ brand: 'Ford', model: 'Focus' }
];
const brands = cars.map(car => car.brand).join(' and ');
What will be the result of the following code?
const cars = [
{ brand: 'Toyota', model: 'Corolla' },
{ brand: 'Ford', model: 'Focus' }
];
const brands = cars.map(car => car.brand).join(' and ');