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

Mention the spread operator #183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

JanisE
Copy link

@JanisE JanisE commented Oct 24, 2017

Add an example of using the spread operator. It should be at least mentioned in the docs.

@brettz9
Copy link

brettz9 commented May 4, 2020

FWIW, this is technically a Rest element (it is the "spread operator" when used outside of a function signature, e.g., when splitting an array into arguments in a function call (e.g., func(...args);), and it is a "object rest property" for cases like function quux ({a, ...rest})).

You might want to update the proposed docs (and issue title) accordingly.

@OmgImAlexis
Copy link

@brettz9 the change they made shows both, no?

@brettz9
Copy link

brettz9 commented May 4, 2020

@OmgImAlexis , yes, you're right there is an example of using the spread operator (i.e., swallow(...products);), but that is not the topic of the documentation.

@OmgImAlexis
Copy link

What I'm meaning is maybe the example also needs to be updated to only show an example of one or the other so readers aren't confused as to which part is being talked about.

@brettz9
Copy link

brettz9 commented May 4, 2020

Agreed...

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

Successfully merging this pull request may close these issues.

None yet

3 participants