ES6 iteration over object values

Brendan Eich brendan at mozilla.org
Sat Mar 15 16:40:03 PDT 2014


Jason Orendorff wrote:
> I'd like to see an Object.entries method, and Object.values for
> completeness. Same visibility rules as Object.keys.
>
>    for (let [k, v] of Object.entries(myObj)) {
>        // do something with k and v
>    }

+1, or +2 counting static methods :-).

/be


More information about the es-discuss mailing list