es6中的模板字符串

es6中的模板字符串 字符串拼接的兩種方式 es6中的字符串代替了原有字符串拼接的功能. 1.傳統字符串拼接(es5方式):javascript let name = '張三'; let age = 9; let str = '個人名字叫' + name + '我今年' + age + '歲了'; console.log(str)//個人名字叫張三我今年9歲了 在
相關文章
相關標籤/搜索