Skip to content

Array pattern destructuring not actually supported? #6

Description

@ninegrid

When demonstrating generators:

function* fibonacci() {
  let a = 0, b = 1;

  while(true) {
    yield a;
    // this syntax doesnt appear to be actually supported
    [a, b] = [b, a + b];
  }
}

ReferenceError: Invalid left-hand side in assignment

I'm using node v0.11.13 with the --harmony flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions