What value is printed when executing the following code?
let result = '';
const fruits = ['apple', 'pear', 'banana'];
fruits.forEach(fruit => {
result += fruit.slice(0, 3);
});
console.log(result);
What value is printed when executing the following code?
let result = '';
const fruits = ['apple', 'pear', 'banana'];
fruits.forEach(fruit => {
result += fruit.slice(0, 3);
});
console.log(result);