We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
这段代码会输出函数本身作为变量b的值,并不会被重新赋值为20。这是因为在自执行函数中中,函数的参数和内部局部变量会覆盖全局作用域中的同名变量。在这个自执行函数中,函数名b被定义为函数本身,并形成了一个闭包。当我们尝试将b重新赋值为20时,其实是在修改闭包中的局部变量,而不是全局变量b。因此,输出结果仍然是函数本身。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这段代码会输出函数本身作为变量b的值,并不会被重新赋值为20。这是因为在自执行函数中中,函数的参数和内部局部变量会覆盖全局作用域中的同名变量。在这个自执行函数中,函数名b被定义为函数本身,并形成了一个闭包。当我们尝试将b重新赋值为20时,其实是在修改闭包中的局部变量,而不是全局变量b。因此,输出结果仍然是函数本身。
The text was updated successfully, but these errors were encountered: