The … three points may refer to:
You use it for object merge
obj1 = { color: "blue" };
obj2 = { color: "red", length: 10 };
obj3 = { name: "TheName" };
console.log('With Spread');
console.log({...obj1, ...obj2, ...obj3});
The spread syntax 1) allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) or multiple variables (for destructuring assignment) are expected.
Spread syntax can be applied only to iterable objects
myFunction(...iterableObj);
[...iterableObj, 4, 5, 6];
The rest parameter 2) syntax allows to represent an indefinite number of arguments as an array.
function f(a, b, ...theArgs) {
// ...
}
where: