Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upArrow function should not return assignment #552
Comments
This comment has been minimized.
This comment has been minimized.
|
I think it's very good, since it can be used to avoid confusion when you missed one of the tags.filter(tag => tag.name = text.text) |
This comment has been minimized.
This comment has been minimized.
dougwilson
commented
Jun 21, 2016
|
And I believe you can just signal that you really meant an assignment by wrapping in parenthesis: tags.filter(tag => (tag.name = text.text)) |
dcousens
added
the
i disagree
label
Jun 21, 2016
This comment has been minimized.
This comment has been minimized.
|
As pointed out by @dougwilson, this error is easily averted in a quite aesthetically pleasing way, especially given the safety net it provides as pointed out by @LinusU. Closing, but don't let that end the conversation if you feel otherwise |
dcousens
closed this
Jun 21, 2016
lock
bot
locked as resolved and limited conversation to collaborators
May 10, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
vdclouis commentedJun 21, 2016
Hello!
Just switched to standard with our team. Loving the simplicity!
I do have one question.
Can you somehow hide the
Arrow function should not return assignmenterror?I feel like it should not be an error.
I love the simplicity of
tags.map(tag => tag.name = text.text)Cheers