gpt-3.5-turbo-0301· OpenAI
WildChat-4.8M (AI2)
nodejs 模版字符串,保留${}
- User
nodejs 模版字符串,保留${}
- Assistant
在模板字符串中使用 ${},需要使用转义符号 \:
const name = 'Alice'; console.log(`Hello \${name}`);输出:
Hello ${name}也可以在模板字符串中使用两个 {}:
const name = 'Alice'; console.log(`Hello $${{name}}`);输出:
Hello ${name}