我需要在嵌套函数中访问全局变量,我该怎么做?
let x = 0
function one() {
console.log(x)
}
function two() {
two()
应该记录为0,但出现错误“ x未定义”
PIPIONE
相关分类