
Notice that the order in which Object.values() and Object.entries() return data is undetermined. Maps have better support of the traditional map (or hash) behavior. This function also makes easy to export plain JavaScript object properties into a Map object. Object.entries() works best with array destructuring assignments, in a way that key and value are assigned to different variables easily. Object.values() and Object.entries() are another improvement step for providing JavaScript developers with new standardized helper functions. If you need an ordered collection, storing data into an Array or Set is the recommended way. In ES5 and earlier standards, the order of properties is simply not specified. However ES2015 has standardized the way properties are iterated: first, come ordered number strings, then strings by insert order and then symbols by insert order. So the order of properties in the object is insignificant. JavaScript objects are simple key-value maps. In a for.of loop statement the iterator can be used directly. To put the result into an array, the spread operator. Notice that greetingsMap.values() and greetingsMap.entries() return iterator objects. But when they're combined with destructuring assignments and for.of loops, you get a short and sweet way to iterate over object's properties.


Notice that the list of features may grow until that time. The new proposals are included in the ECMAScript 2017 standard, which probably will be released in the summer of 2017.
