New issue
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
Bug about _.keys()? #2799
Comments
Here you can verify the function |
@rookieLink If you do just this, function A (){}
A.prototype.toString = 'original value';
var a = new A(); Then
If you now also do this: a.toString = 'new value'; Then you create an extra own property on
So it is important to understand that when you do A.prototype.toString = 'original value'; this just sets a “default value” for the Hope this answers your question. I will close this issue now, but feel free to comment again. |
I read underscore's code about _.keys()
if I want to invoke the code in IE7, there will be:
`
function A (){}
A.prototype.toString = 'test';
var a = new A();
a.toString = 'test';
_.keys(a); //there should be [] rather than ['toString']?
`
right? I need some help
The text was updated successfully, but these errors were encountered: