字符串模板${}失效

使用字符串模板${}时需要table上面的符号`(反单引号),不是单引号。

console.log(`Server running at http://${hostname}:${port}/`);
posted @ 2019-04-23 10:29  江寒7  阅读(384)  评论(0编辑  收藏  举报