javascript - 你不容错过的es6模板写法
2021-07-08 11:07
                         标签:unit   java   class   console   shel   key   variable   word   step      javascript - 你不容错过的es6模板写法 标签:unit   java   class   console   shel   key   variable   word   step    原文地址:https://www.cnblogs.com/cisum/p/9581939.html 1  /**
 2      * ``即重音符(128键盘左上角ESC下面那个键盘)
 3      *   隶属:模板字符串
 4      */
 5 
 6     let unit = ‘4‘;
 7     let keywords = ‘uc‘;
 8 
 9     // step1:模板变量 ${variable_name}
10     let url = `Shell${keywords}${unit}`;
11     console.log(url);
12 
13     // 旧
14     let urls = ‘Shell‘ + keywords + unit;
15     console.log(urls);
16 
17 
18 
19     // step2: 模板制作(更加智能化)
20     let view = `
21     
上一篇:线程的暂停与恢复
下一篇:JSON.NET使用简单说明
文章标题:javascript - 你不容错过的es6模板写法
文章链接:http://soscw.com/index.php/essay/102357.html