We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
[QUESTION]
Is there any way to shorten the following with ES6 features?
return { op: this.op, lhs: this.lhs, rhs: this.rhs };
I was hoping I could do something like this...
return { this.op, this.lhs, this.rhs };
...but that results in a syntax error.
It is possible to do this...
const { op, lhs, rhs } = this; return { op, lhs, rhs };
...but that's still a bit verbose (you have to repeat {op, lhs, rhs} twice, which becomes inefficient with longer or more properties).
{op, lhs, rhs}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
[QUESTION]
Is there any way to shorten the following with ES6 features?
I was hoping I could do something like this...
...but that results in a syntax error.
It is possible to do this...
...but that's still a bit verbose (you have to repeat
{op, lhs, rhs}
twice, which becomes inefficient with longer or more properties).The text was updated successfully, but these errors were encountered: