当前位置:网站首页>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
边栏推荐
- Click the Add button - a box appears (similar to adding learning experience - undergraduate - Graduate)
- Study notes: unity customsrp-11-post processing --- bloom
- Redis in node -- ioredis
- Study notes: unity customsrp-13-colorgrading
- 领域驱动模型DDD(三)——使用Saga管理事务
- Laravel [view]
- 改进DevSecOps框架的 5 大关键技术
- 学习笔记:Unity CustomSRP-13-ColorGrading
- Blender程序化地形制作
- Laravel database
猜你喜欢
随机推荐
2021-10-12
Double click The jar package cannot run the solution
node中的redis使用--ioredis
Five key technologies to improve the devsecops framework
egg测试的知识大全--mock、superTest、coffee
MFC implementation resources are implemented separately by DLL
Qingdao agile tour, coming!
Project manager's thinking mode worth trying: project success equation
selenium预先加载cookie的必要性
Study notes: unity customsrp-12-hdr
使用 Kears 实现ResNet-34 CNN
Basic use of sqlyog
(十一)vscode代码格式化配置
Solve the problem of JS calculation accuracy
即将毕业的大学生找技术开发工作的焦虑根源
Uniapp hot update with progress bar
Pandas to_ SQL function pit avoidance guide "with correct code to run"
青岛敏捷之旅,来了!
Wbpack configuring production development environment
Semi synchronous replication of MariaDB