当前位置:网站首页>`${}`的用法
`${}`的用法
2022-07-02 22:06:00 【爬楼梯的前端小白】
在 `` 中可以使用 ${} 直接把变量和字符串拼接起来
用法
step1: 定义需要拼接进去的字符串变量
step2: 将字符串变量用${}包起来,再写到需要拼接的地方
let name = '彭于晏'
console.log( '名字为:'+name )
console.log( `名字为:${name} ` )
let a='Karry Wang';
let str=`I love ${a}, because he is handsome.`;
//注意:这行代码是用返单号引起来的
alert(str);
边栏推荐
- [shutter] shutter application theme (themedata | dynamic modification theme)
- New feature of go1.18: introduce new netip Network Library
- Market Research - current market situation and future development trend of aircraft wireless intercom system
- [shutter] shutter gesture interaction (small ball following the movement of fingers)
- Socket套接字C/S端流程
- PHP implements querying the data matching the date of birth according to the entered age
- SimpleITK使用——4. 奇怪的問題
- 服务器响应状态码
- Notes on key vocabulary in the English original of the biography of jobs (10) [chapter eight]
- 任务和特权级保护
猜你喜欢

Based on asp Net (used mobile phone sales management system) +asp Net+c # language +vs2010+ database can be used for course design and post design learning

Oracle cursor

Developers share | HLS and skillfully use Axi_ Customize the master bus interface instructions and improve the data bandwidth - area exchange speed

C language, to achieve three chess games

Simpleitk use - 4 Strange question

【ODX Studio编辑PDX】-0.1-如何快速查看各Variant变体间的支持的诊断信息差异(服务,Sub-Function...)
![[shutter] shutter page life cycle (initialization period | createstate | initstate | update period | build | destroy period | dispose)](/img/07/6f2dfb543cb0ab4f27169da7e6ad07.jpg)
[shutter] shutter page life cycle (initialization period | createstate | initstate | update period | build | destroy period | dispose)

Build your own website (22)

Share how to make professional hand drawn electronic maps

"Actbert" Baidu & Sydney University of technology proposed actbert to learn the global and local video text representation, which is effective in five video text tasks!
随机推荐
Using rendertext() to output multiple lines of text with rendertext() in R shiny
Market Research - current situation and future development trend of environmental friendly fireworks Market
傑理之修改不需要長按開機功能【篇】
NC50965 Largest Rectangle in a Histogram
Bridge emqx cloud data to AWS IOT through the public network
Promise optimized callback hell
Market Research - current market situation and future development trend of aircraft front wheel steering system
540. Single element in ordered array
JS获取display为none的隐藏元素的宽度和高度的解决方案
Leetcode circular linked list (fast and slow pointer) code line by line interpretation
影视随摘
解决 excel 文件上传时更改选中的文件出现错误net::ERR_UPLOAD_FILE_CHANGED
Market Research - current market situation and future development trend of night vision goggles for pilots
Market Research - current market situation and future development trend of aircraft wireless intercom system
Additional: [login information storage] and [login status verification]; (including: summarizing all the contents of [login information storage] and [login status verification] so far;)
Based on asp Net (used mobile phone sales management system) +asp Net+c # language +vs2010+ database can be used for course design and post design learning
Learn computer knowledge from scratch
Sql service intercepts string
PHP微信抢红包的算法
[QT] Q multithreaded development - Analysis of multithreaded application examples (Mandelbrot)
https://blog.csdn.net/qq_34246965/article/details/108085291?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165639630516781435488372%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=165639630516781435488372&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_click~default-2-108085291-null-null.142^v24^pc_rank_34,157^v15^new_3&utm_term=%24%7B%7D&spm=1018.2226.3001.4187