This is something very basic I might be missing here but I haven\'t seen such result till now.
I have a for loop where options.headers.length is 3
. And in
I assume that options.headers is an Array?
This happens when you (or some framework you load) adds methods to the Array prototype. The "for in" loop will enumerate also these added methods. Hence you should do the loop for an array with:
for (var i = 0; i < options.headers.length; i++)
That way you will only get the real values instead of added methods.