Is it really so? This little snippet shows that Object.keys doesn't really enumerate keys but rather ... values.
var p = {
foo : 0,
bar : 1
};
for ( var e in p ) {
console.log( e );
}
for ( var e in Object.keys( p ) ) {
console.log( e );
}
The snippet prints
foo bar 0 1while it definitely should print
foo bar foo barWhat's wrong here?