let name1 = "li"
let name2 = "shi"
let name = name1 +' '+name2
console.log('你好'+name ) // 你好li shi
console.log(`${name1} ${name2}`)// 你好li shi
let name1 = "li"
let name2 = "shi"
let name = name1 +' '+name2
console.log('你好'+name ) // 你好li shi
console.log(`${name1} ${name2}`)// 你好li shi
本文标题:ES6基础-模板字符串
本文链接:https://www.haomeiwen.com/subject/ifkqyftx.html
网友评论