At ECMAScript specification the SpreadElement is described
SpreadElement[Yield]:
...AssignmentExpression[In, ?Yield]
Is this the same as th
SpreadElement
is just a name in the ES6 grammar for spread "operator" together with its argument when in an Array literal:
SpreadElement[Yield]:
... AssignmentExpression[In, ?Yield]
So, SpreadElement
in [a, b, ...c]
is ...c
; spread "operator" is ...
. (scare quotes because it is not a real operator in the same sense that, e.g. -
is.)
The name of the grammar rule being used in function calls will be different, as it is a different grammatical context (it's just one kind of ArgumentList
).