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

Returning an object literal #4033

Closed
vbwx opened this issue Jul 9, 2015 · 1 comment
Closed

Returning an object literal #4033

vbwx opened this issue Jul 9, 2015 · 1 comment

Comments

@vbwx
Copy link

vbwx commented Jul 9, 2015

The following code produces a syntax error:

return
    a: 1
    b: 2

This, however, works:

return {
    a: 1
    b: 2
}

Syntactically, there is no reason why the braces should be mandatory.

It's just an edge case, of course, but the syntax error was unexpected ;)

@vendethiel
Copy link
Collaborator

duplicate of #1263

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

No branches or pull requests

2 participants