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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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