假设我有这样的模板文字:consttemplateLiteral=`stringtext${expression}stringtext`我想将模板字面量动态计算为完成的字符串。functiontoFoo(templateLiteral){//returns"stringtextFoostringtext"returntemplateLiteral.evaluate('Foo');}functiontoBar(templateLiteral){//returns"stringtextBarstringtext"returntemplateLiteral.evaluate('Bar');}