Alternative version for Object.values()

前端 未结 11 1718
花落未央
花落未央 2020-11-28 06:13

I\'m looking for an alternative version for the Object.values() function.
As described here the function is not supported in Internet Explorer.

When

11条回答
  •  离开以前
    2020-11-28 06:56

    For people using UnderscoreJS, you can get object values by using _.values :

    var obj = { foo: 'bar', baz: 42 };
    console.log(_.values(obj)); // ['bar', 42]
    

提交回复
热议问题