JavaScript syntax: Difference between revisions

Content deleted Content added
m added citation
Reverted to revision 919264469 by Sommozzatore (talk): Blogspam (TW)
Line 939:
==== Spread/rest operator ====
 
The ECMAScript 2015 standard introduces the "<tt>...</tt>" operator<ref>{{Cite web|url=https://www.wisdomgeek.com/development/web-development/rest-and-spread-operator-three-dots-that-changed-javascript/|title=Rest and Spread operator: Three dots that changed JavaScript|last=Kataria|first=Saransh|date=2019-10-17|website=Wisdom Geek|language=en-US|access-date=2019-10-17}}</ref>, for the related concepts of "spread syntax"<ref>{{cite web|url=https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Spread_operator|title=Spread syntax}}</ref> and "rest parameters"<ref>{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters| title = rest parameters}}</ref>
 
'''Spread syntax''' provides another way to destructure arrays. It indicates that the elements in a specified array should be used as the parameters in a function call or the items in an array literal.