Firefox: for-of and objects

Marek Stępień marcoos+es at
Thu Oct 25 05:16:47 PDT 2012

On Thu, Oct 25, 2012 at 1:24 PM, Axel Rauschmayer <axel at> wrote:
> Sorry, slightly off-topic: Does Firefox already have @iter.items (etc.)? Or
> is there something similar one could use to iterate over [key, value] pairs
> for objects, via for-of?

You can use Iterator, e.g.:

for ([key, value] of Iterator({a:1, b:2, c:3})) {
  alert(key + "=>" + value);

Marek Stępień

More information about the es-discuss mailing list