How does JavaScript know the difference between the spread and rest operator?
The syntax is identical so how does JavaScript distinguish the two under the hood? Does it look at the data type of the variable that is being operated on? Or where that variable is being used? Both or neither?