当前位置:网站首页>`${}`的用法
`${}`的用法
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);
边栏推荐
- LxC terminal login method
- [shutter] shutter application life cycle (foreground state resumed | background state paused | inactive | component separation state detached)
- Market Research - current market situation and future development trend of marine wet exhaust hose
- New feature of go1.18: introduce new netip Network Library
- NC50965 Largest Rectangle in a Histogram
- 存储单位换算
- "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!
- 佩服,竟然有人把高等数学这么晦涩难懂的科目,讲解得如此通俗易懂
- 任务和特权级保护
- App page sharing password rails implementation
猜你喜欢

牛客网:最大子矩阵

【ODX Studio编辑PDX】-0.1-如何快速查看各Variant变体间的支持的诊断信息差异(服务,Sub-Function...)

电商系统微服务架构

Share how to make professional hand drawn electronic maps
![[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)
![[shutter] shutter gesture interaction (small ball following the movement of fingers)](/img/5a/a8dad8a0943645c980cc4fe7cb55d4.gif)
[shutter] shutter gesture interaction (small ball following the movement of fingers)
![[shutter] shutter resource file use (import resource pictures | use image resources)](/img/e9/94ae2e3ee315f490eb3cf14bcf2e49.jpg)
[shutter] shutter resource file use (import resource pictures | use image resources)

腾讯三面:进程写文件过程中,进程崩溃了,文件数据会丢吗?

SimpleITK使用——3. 常见操作

phpcms实现订单直接支付宝支付功能
随机推荐
How should programmers write logs
JS solution for obtaining the width and height of hidden elements whose display is none
Market Research - current market situation and future development trend of third-party data platform
[shutter] shutter custom fonts (download TTF fonts | pubspec.yaml configure font resources | synchronize resources | globally apply fonts | locally apply fonts)
Share how to make professional hand drawn electronic maps
Web侧防御指南
Oracle PL / SQL programming
An overview of the development of affective computing and understanding research
Introduction to database system Chapter 1 short answer questions - how was the final exam?
Les trois principaux points de douleur traités par servicemesh
数据库系统概论第一章简答题-期末考得怎么样?
'when to use const char * and when to use const char []' - when to use const char * and when to use const char []
【外刊】睡眠与减肥
Market Research - current situation and future development trend of sickle cell therapy Market
I admire that someone explained such an obscure subject as advanced mathematics so easily
Learn computer knowledge from scratch
Utilisation de simpletk - 4. Question étrange
Regular expression (2)
[QT] QT multithreading development - reentrancy and thread safety
[shutter] shutter opens a third-party application (url|launcher plug-in search and installation | url| launcher plug-in official example | open browser | open a third-party application)
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