function tag(strings, ...values) {
// strings.raw preserves literal escape sequences
const rawParts = strings.raw;
let result = rawParts.join('|');
result += '::' + values.join(',');
return result;
}
const x = 5;
const output = tag`Line1\nLine2${x}End`;
console.log(output); Post #3400
2.57K
CHALLENGE
- 👍 5
- ❤ 4
- 🔥 2