当前位置:网站首页>[ES6] template string: `string`, a new symbol in es2015
[ES6] template string: `string`, a new symbol in es2015
2022-07-04 11:37:00 【Ruixin's blog】
explain : Through an example to illustrate the differences between the three :
Be careful : Symbol of template string [`] It's a button ~ The symbol under
describe :
There is one js Variables store the total number of people :var peopleSum = 88,
It is required to output this sentence in the following format : The total number of people is 88 people
console.log(‘ The total number of people is ’+peopleSum+‘ people ’);
console.log(“ The total number of people is ”+peopleSum+“ people ”);
console.log( The total number of people is ${peopleSum} people
);
explain :string It's a template string ,ES2015 New symbols . In the template string var Is a placeholder for variables .
{} inside The expression is still js, Outside, too js .
边栏推荐
- Ultimate bug finding method - two points
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 19
- No response after heartbeat startup
- DVC use case (VI): Data Registry
- R built in data set
- Function parameters (positional parameters, default value parameters, variable parameters, named keyword parameters, keyword parameters)
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 23
- CAPL: on sysVar_ Update difference on sysvar
- If function in SQL
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8
猜你喜欢
QQ group administrators
Canoe - the third simulation project - bus simulation - 3-2 project implementation
(2021-08-20) web crawler learning 2
Some summaries of the 21st postgraduate entrance examination 823 of network security major of Shanghai Jiaotong University and ideas on how to prepare for the 22nd postgraduate entrance examination pr
Notes on writing test points in mind mapping
Elevator dispatching (pairing project) ②
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 9
os. Path built-in module
Application of slice
随机推荐
Canoe - the third simulation project - bus simulation - 3-1 project implementation
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 18
2018 meisai modeling summary +latex standard meisai template sharing
re. Sub() usage
C language compilation process
Install freeradius3 in the latest version of openwrt
netstat
TCP slicing and PSH understanding
Process communication and thread explanation
Climb Phoenix Mountain on December 19, 2021
Dos and path
Postman advanced
LxC shared directory permission configuration
VPS安装Virtualmin面板
Digital simulation beauty match preparation -matlab basic operation No. 6
Login operation (for user name and password)
Definition and method of string
Notes on writing test points in mind mapping
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 23
守护进程Xinted和日志记录Syslogd