function tag(strings, ...values) {
return strings.reduce((acc, str, i) => {
return acc + str + (values[i] ? values[i].toUpperCase() : '');
}, '');
}
const first = "hello";
const second = "world";
const result = tag`${first} and ${second} are great!`;
console.log(result);
Post #1699
6.36K
CHALLENGE ❓
- ❤ 7
- 🔥 5
- 👍 2