<>Object.values() Usage of

<>1, grammar
Object.values(obj)
<> parameter

obj: Objects returned with enumerable property values .

<> Return value

An array containing all enumerable property values of the object itself .

<>2, describe

Object.values() Returns an array , Its element is the enumerable property value found on the object . The order of properties is the same as that given by manually cycling the property values of an object .

<>3, Example
var obj = { foo: 'bar', baz: 42 }; console.log(Object.values(obj)); // ['bar',
42] // array like object var obj = { 0: 'a', 1: 'b', 2: 'c' }; console.log(
Object.values(obj)); // ['a', 'b', 'c'] // array like object with random key
ordering // when we use numeric keys, the value returned in a numerical order
according to the keys var an_obj = { 100: 'a', 2: 'b', 7: 'c' }; console.log(
Object.values(an_obj)); // ['b', 'c', 'a'] // getFoo is property which isn't
enumerable var my_obj = Object.create({}, { getFoo: { value: function() { return
this.foo; } } }); my_obj.foo = 'bar'; console.log(Object.values(my_obj)); //
['bar'] // non-object argument will be coerced to an object console.log(Object.
values('foo')); // ['f', 'o', 'o']
<>4,Polyfill

If you want to Object.values Compatible with old environments that do not support it , Available at tc39/proposal-object-values-entries or
es-shims/Object.values Found in Polyfill .

according to Object.keys() Of Polyfill Copy one :
if (!Object.values) Object.values = function(obj) { if (obj !== Object(obj))
throw new TypeError('Object.values called on a non-object'); var val=[],key; for
(key in obj) { if (Object.prototype.hasOwnProperty.call(obj,key)) { val.push(obj
[key]); } } return val; }
<>5, standard

<>6, Browser compatible

Technology
©2019-2020 Toolsou All rights reserved,
It's unexpected Python Cherry tree (turtle The gorgeous style of Library )Unity3D of UGUI Basics -- Three modes of canvas os Simple use of module computer network --- Basic concepts of computer network ( agreement , system )html Writing about cherry trees , Writing about cherry trees Some East 14 Pay change 16 salary , Sincerity or routine ?Unity-Demo Examples ✨ realization UI- Backpack equipment drag function 06【 Interpretation according to the frame 】 Data range filtering -- awesome java Four functional interfaces ( a key , simple )