This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer
In JavaScript, the same syntax – triple dots (...
) – is used for two different mechanisms:
- Rest syntax is for receiving data.
- Spreading is for sending data.
This blog post examines how these mechanisms work and why they are not operators.
This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer
Dr. Axel Rauschmayer | Sciencx (2022-05-04T00:00:00+00:00) The triple dot syntax (...
) in JavaScript: rest vs. spread. Retrieved from https://www.scien.cx/2022/05/04/the-triple-dot-syntax-in-javascript-rest-vs-spread/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.