What will be shown when executing the following code?
const fruits = [
{ type: 'apple', color: 'red' },
{ type: 'banana', color: 'yellow' }
];
const colors = fruits.map(fruit => fruit.color);
console.log(colors.join(', '));
What will be shown when executing the following code?
const fruits = [
{ type: 'apple', color: 'red' },
{ type: 'banana', color: 'yellow' }
];
const colors = fruits.map(fruit => fruit.color);
console.log(colors.join(', '));