0
var abc = "text";
var text = "content of text";
var out_right = ` ${abc}=${text}`; // get string "text=content_of_text"
var out_template = '${abc}=${text}';
var out_wrong_0 = ` out_template `;
var out_wrong_1 = ` ${out_template} `;
我的问题是如何使用字符串out_template
得到我需要的字符串:"text=content_of_text"
。路线插值使用反引号与现有的字符串模板
greate答案,也告诉为什么!非常感谢。 – tlqtangok