Spread and rest operator

I have been using spread and rest operator for a while now. But I never really understood the difference between them. I decided to write a post about it to clarify it for myself and for others. Here is a short explanation. Spread operator is used to split up array elements or object properties. Rest operator is used to merge a list of function arguments into an array.