const foo = (str, arr, cb) => str + arr.map(item => cb(item)).join(" ");
const capitalize = str => str.charAt(0).toUpperCase() + str.slice(1);
console.log(foo("New value: ", ["apple", "orange", "pear"], capitalize)); // New value: Apple Orange Pear
const foo = (str, arr, cb) => str + arr.map(item => cb(item, 1)).join(" ");
const substring = (str, start) => str.slice(start); // Получение строки с start (в частности со второго) символа
console.log(foo("New value: ", ["apple", "orange", "pear"], substring)); // New value: pple range ear
const foo = (str, arr, cb) => str + arr.map(item => cb.call(item, 1)).join(" ");
console.log(foo("New value: ", ["apple", "orange", "pear"], String.prototype.slice)); // New value: pple range ear
const foo = (str, arr) => str + arr.map(item => item.slice(1)).join(" ");