DEV Community

Discussion on: Know the difference between theses JS concept in order to skill up #1

Collapse
 
khangnd profile image
Khang

The point about Spread and Rest is not correct, it should be the other way around.

Rest syntax looks exactly like spread syntax. In a way, rest syntax is the opposite of spread syntax. Spread syntax "expands" an array into its elements, while rest syntax collects multiple elements and "condenses" them into a single element

Source: MDN

Collapse
 
codeoz profile image
Code Oz

Nice explication thank for sharing Khang!