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 f() { alert(this) // or console.log(this) in NodeJS environment } let user = { g: f.bind(null) } user.g()
I did not get null. The Global Object is still displayed. Window in the browser environment and NodeJs Global Object in NodeJS environment.
The text was updated successfully, but these errors were encountered:
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Function/bind#parameters
If the function is not in strict mode, null and undefined will be replaced with the global object
Sorry, something went wrong.
That works. Thanks.
No branches or pull requests
I did not get null. The Global Object is still displayed. Window in the browser environment and NodeJs Global Object in NodeJS environment.
The text was updated successfully, but these errors were encountered: