I was attempting to extend Javascript's Object type with a function that retrieves all of the property names that are part of that object (basically what PHP's array_keys() function does to ...
I've added some useful helpers to Array (such as toSource() for Opera). And now for..in returns the functions with normal properties.
I'm using for..in now, because the code is easier to read ...
To put things in context, I'm loading a list of items via Ajax, creating a div with main info for each one and want to display details on page when clicking ...
I extended Array to support indexOf in IE using this JavaScript function from Mozilla MDC.
Unfortunately, when using for...in syntax to iterate over the Array, the loop stops on indexOf ...
I am aware that the for in loop can help iterate through properties of objects, prototypes and collections.
The fact is, I need to iterate over String.prototype, and though console.log(String.prototype) displays the ...