看来这是一个语法错误.应该是正确的:
`${vendor}Now`
Template strings are enclosed by the back-tick (`) (grave accent) character instead of double or single quotes. Template strings can contain place holders. These are indicated by the Dollar sign and curly braces (${expression}).
模板字符串中的方括号是错误的.
更具体地说,如果你有:
var expression = 'test';
console.log(`string text ${expression} string text`); //Correct syntax
上面的代码将导出:“字符串文本测试字符串文本”
但下面的代码有一个开口方括号,一个关闭curly bracket
var expression = 'test';
console.log(`string text $[expression} string text`); //Wrong syntax
将只导出:“字符串文本$[表达式}字符串文本”