We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
I do not agree with what you can read in paragraph 4.4.
In fact, my understanding is that spread syntax can only be applied to iterable objects and not to array-like objects.
References:
Before changes introduced with issue #1084, you could read:
To convert an array-like object to an array, use Array.from
which I consider being correct.
Furthermore, I would personally expand it by saying:
To convert an iterable object or an array-like object to an array, use Array.from
That is because I agree with the authors of Javscript.info:
So, for the task of turning something into an array, Array.from tends to be more universal.
The text was updated successfully, but these errors were encountered:
Good point. This was added in #1549.
We should update this to indicate that iterables should use spreads, but array-like objects should use Array.from.
Array.from
Sorry, something went wrong.
No branches or pull requests
I do not agree with what you can read in paragraph 4.4.
In fact, my understanding is that spread syntax can only be applied to iterable objects and not to array-like objects.
References:
Before changes introduced with issue #1084, you could read:
which I consider being correct.
Furthermore, I would personally expand it by saying:
That is because I agree with the authors of Javscript.info:
The text was updated successfully, but these errors were encountered: