You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This section suggests the Spread Operator syntax only works for iterable object literals. In fact, generic Object literal declarations also support spread operator assignment syntax:
"Note that the spread operator isn’t limited to arrays and arguments. The spread operator can be used with any iterable object. Iterable is a protocol in ES6 that allows you to turn any object into something that can be iterated over. We’ll research the iterable protocol in Iteration and Flow Control."
Is there another section where non-iterable Object Literal spread syntax is covered?
The text was updated successfully, but these errors were encountered:
Object spread wasn’t part of the language until ES2018; and it applies to any object, iterable or not (mst objects aren’t iterable, including your two examples)
This section suggests the Spread Operator syntax only works for iterable object literals. In fact, generic Object literal declarations also support spread operator assignment syntax:
"Note that the spread operator isn’t limited to arrays and arguments. The spread operator can be used with any iterable object. Iterable is a protocol in ES6 that allows you to turn any object into something that can be iterated over. We’ll research the iterable protocol in Iteration and Flow Control."
Is there another section where non-iterable Object Literal spread syntax is covered?
The text was updated successfully, but these errors were encountered: