当前位置:网站首页>Escape characters \ splicing of data formats
Escape characters \ splicing of data formats
2022-04-23 05:26:00 【Courtesy.】
Escape character
let vv = "vvlikeVV"
console.log(vv)
document.write(vv)
If you want the output to look like :vv“like”VV, You can use the escape character \ that will do
let vv = "vv\"like\"VV"
If you want the output to look like :vv like VV, There's a gap in the middle , You can use the escape character \t that will do
html The space in the can be used
let vv = "vv\tlike\t\tVV"
\n Means line break
Data connection
Xiao Ming was born in 2020 year .
let year = "2020 year ";
let name = " Xiao Ming ";
// console.log(name + “ Born in " + year ); Method 1
console.log(` ${
name} Born in ${
year}.`); Method 2 , Recommended , Free line breaks
document.write(vv);
2020 It was the year Xiao Ming was born
let year = "2020 year ";
year+=" It was the year Xiao Ming was born "
console.log(vv);
document.write(vv);
77.333.com
function show() {
return "333.com";
}
let zzj = `77.${
show()}`;
console.log(zzj);
版权声明
本文为[Courtesy.]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220544339080.html
边栏推荐
- !!!!!!!!!!!!!!!!!!
- What are the most popular recruitment technical skills in 2022? You can't think of it
- 领域驱动模型DDD(三)——使用Saga管理事务
- 我这位老程序员对时代危险和机遇的一点感悟?
- mariadb数据库的主从复制
- 学习笔记:Unity CustomSRP-11-Post Processing---Bloom
- Good test data management, in the end how to do?
- 4 most common automated test challenges and Countermeasures
- 2021 年 25 大 DevOps 工具(下)
- Uniapp wechat sharing
猜你喜欢
随机推荐
phphphphphphphp
分支与循环语句
Low code and no code considerations
CPT 104_ TTL 09
Self incrementing sequence creation of MySQL
Cloud computing and cloud native architecture design of openshift
varnish入门
egg的static的前缀是可以修改惹,靴靴
JVM memory and memory overflow exceptions (personal summary)
Semi synchronous replication of MariaDB
The introduction of lean management needs to achieve these nine points in advance
Using PHP post temporary file mechanism to upload arbitrary files
What are the most popular recruitment technical skills in 2022? You can't think of it
Study notes: unity customsrp-13-colorgrading
If the route reports an error after deployment according to the framework project
Why can't V-IF and V-for be used together
The source of anxiety of graduating college students looking for technology development jobs
Tslint annotations ignore errors and restful understanding
Modèle axé sur le domaine DDD (III) - gestion des transactions à l'aide de Saga
How to set the initial value of El input number to null









