嘿伙计们,我想知道这两种单引号'和'之间有什么区别?
我试图执行以下命令`然后它工作
axios.get(`https://api.github.com/users/${this.state.userName}`)
.then(resp => {
console.log(resp);
});
Run Code Online (Sandbox Code Playgroud)
但当我试图使用''运行相同的命令它不起作用
axios.get('https://api.github.com/users/${this.state.userName}')
.then(resp => {
console.log(resp);
});
Run Code Online (Sandbox Code Playgroud)