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
var a = [1, 2, 3]; add3.apply(window, a);
The text was updated successfully, but these errors were encountered:
I don't think node has a global window object. I get "ReferenceError: window is not defined" when I try it.
Sorry, something went wrong.
@clarkgrubb global works also.
global
Also try using this instead.
this
var a = [1, 2, 3]; add3.apply(this, a);
If you are nesting the functions you could set window=this or global=this at the beginning of the file
window=this
global=this
As this function doesn't need a context call, you can just:
add3.apply(null, a)
No branches or pull requests
The text was updated successfully, but these errors were encountered: