模板字符串与一般字符串
认识模板字符串: const username1 = 'alex'; // "alex" const username2 = `alex`; console.log(username1, username2, username1 === username2); // alex alex true //模板字符串也可存入字符串模板字符串与一般字符串的区别:1、和其他东西一起使用的时候,使用模板字符串,方便注入。2、 其他情况下使用模板字符
原创
2021-04-21 11:15:14 ·
979 阅读 ·
0 评论