当前位置:网站首页>[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 .
边栏推荐
- Decrypt the advantages of low code and unlock efficient application development
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 11
- Iptables cause heartbeat brain fissure
- Exceptions and exception handling
- re. Sub() usage
- 2021-08-09
- CAPL: on sysVar_ Update difference on sysvar
- 本地Mysql忘记密码的修改方法(windows)[通俗易懂]
- Take advantage of the world's sleeping gap to improve and surpass yourself -- get up early
- Some tips on learning database
猜你喜欢
Canoe - the third simulation project - bus simulation - 3-2 project implementation
Oracle11g | getting started with database. It's enough to read this 10000 word analysis
DDS-YYDS
TCP slicing and PSH understanding
OSI seven layer reference model
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 11
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12
Ultimate bug finding method - two points
Introduction to Lichuang EDA
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 10
随机推荐
Function parameters (positional parameters, default value parameters, variable parameters, named keyword parameters, keyword parameters)
No response after heartbeat startup
array_ The contains() function uses
Definition and method of string
MBG combat zero basis
Postman advanced
DVC use case (VI): Data Registry
thread
Swagger and OpenAPI
2018 meisai modeling summary +latex standard meisai template sharing
Summary of Shanghai Jiaotong University postgraduate entrance examination module firewall technology
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12
Global function Encyclopedia
Replace() function
Realize cross tenant Vnet connection through azure virtual Wan
Application of slice
Foreach (system.out:: println) usage
守护进程Xinted和日志记录Syslogd
Introduction to Lichuang EDA
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20