There are many functions in Javascript that just work. We use them daily, but we don't know about their extra features. At one day, we look at its documentation and realize it has many more features then we have imagined.
Once upon a time, there was a significant upgrade to the Javascript language called ES6/ES2015. It introduced many different new features. One of them was the three consecutive dots that we can write in front of any compatible container (objects, arrays, strings, sets, maps).