Javascript Property with three dots (...)
That is not ES6 but has only been added in ECMAScript 2018.
It is called "Object Rest/Spread Properties" and is part of the Spread Syntax.
...
(three dots in Javascript) is called the Spread Syntax or Spread Operator. This allows an iterable such as an array expression or string to be expanded or an object expression to be expanded wherever placed.
I want to list down the mostly used practical Use Cases of the Spread Syntax (Spread Operator). The following has been explained with examples in this stackoverflow answer.
- Combine Arrays (Concatenate Arrays)
- Copying Arrays
- Calling Functions without Apply
- Destructuring Arrays
- Function Arguments as Rest Parameters
- Using Math Functions
- Combining Two Objects
- Separate a String into Separate Characters