Spread syntax and rest syntax can make your coding much cleaner. They both have the same syntax (i.e. …
), but when the ellipses are used in different places, they do different things.
The difference is that spread syntax spreads the elements of an array or object into individual variables, whereas rest syntax condenses individual variables and puts them into an array or object.
#javascript