Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow trailing comma in function arguments #453

Closed
olessavluk opened this issue Sep 30, 2017 · 0 comments
Closed

Allow trailing comma in function arguments #453

olessavluk opened this issue Sep 30, 2017 · 0 comments

Comments

@olessavluk
Copy link
Contributor

Currently it is valid to have trailing comma in function declaration, but not in function call. However according to spec it should work in both cases.

Example javascript code to reproduce this:

function a (
  a,
  b,
  c, // <- no error
) {
  console.log(params);
}

a(
  1,
  2,
  3,
); // <- error: "missing ) after argument list"

This feature was discussed before in #403 and later implemented in PR #410 .

@olessavluk olessavluk changed the title Allow trailing commas in function parameter lists Allow trailing comma in function arguments Sep 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant