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
function foo() { var a = 2; this.bar(); } function bar() { console.log( this.a ); } foo(); //undefined
这段代码在chrome控制台执行的时候,不会报错,是可以执行的。 但是在node环境中,是直接报错“TypeError: this.bar is not a function”。 请问,这种情况该如何有效的理解?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这段代码在chrome控制台执行的时候,不会报错,是可以执行的。
但是在node环境中,是直接报错“TypeError: this.bar is not a function”。
请问,这种情况该如何有效的理解?
The text was updated successfully, but these errors were encountered: