I'm looking for an alternative version for the Object.values()
function.
As described here the function is not supported in Internet Explorer.
When executing the following example code:
var obj = { foo: 'bar', baz: 42 };
console.log(Object.values(obj)); // ['bar', 42]
It works in both, Firefox and Chrome, but throws the following error in IE11:
Object doesn't support property or method "values"
Here you can test it: Fiddle.
So, what would be a quick fix?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…