大家好,我想知道这两种单引号 ` 和 ' 有什么区别。
我尝试使用 ` 执行下面的命令,然后它就可以正常工作了。
axios.get(`https://api.github.com/users/${this.state.userName}`)
.then(resp => {
console.log(resp);
});
但是当我尝试使用''运行相同的命令时,它无法工作。
axios.get('https://api.github.com/users/${this.state.userName}')
.then(resp => {
console.log(resp);
});