[英]print variables using ${ var } in javascript
You're using the wrong quote type.您使用了错误的报价类型。 To do what you want you'll need to use backtick.
要执行您想要的操作,您需要使用反引号。 It's the one to the left of the 1 key on most keyboards.
它是大多数键盘上 1 键左侧的一个。
console.log( Server at port ${port}
) // Don't put "" or ''. console.log(
Server at port ${port}
) // 不要输入 "" 或 ''。 Use ``使用``
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.