小编Sky*_*ooo的帖子

JavaScript string interpolation on strings assigned as property values in objects

I have the following object:

var obj = {
   number: "123456789"
   tel: `The clients phone number is ${number}. Please call him!`
Run Code Online (Sandbox Code Playgroud)

How can I insert the number value in the tel-string?

javascript string-interpolation

2
推荐指数
1
解决办法
42
查看次数

标签 统计

javascript ×1

string-interpolation ×1