- 博客(2)
- 收藏
- 关注
原创 es6:模板字符串
字符串格式化,使用 ${} 进行格式化。 示例1: const s = 'hello'; console.log(`say ${s}`); //执行结果 say hello 示例2: //旧代码,需要用 str.concat()进行字符串拼接 let imageSource = ''; let str1 = 'http://file/download?fileName='; let str2 = '&user=e'; imageSource = str1.
2022-03-22 16:57:17
428
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人