Combining ES6 unicode literals with ES6 template literals [duplicate]
问题 This question already has an answer here : ES6: Bad character escape sequence creating ASCII string (1 answer) Closed 3 years ago . If I want to print a unicode Chinese character in ES6/ES2015 javascript, I can do this: console.log(`\u{4eb0}`); Likewise, if I want to interpolate a variable into a template string literal, I can do this: let x = "48b0"; console.log(`The character code is ${ x.toUpperCase() }.`); However, it seems that I can't combine the two to print a list of, for example, 40