Search code examples
javascriptangularfire2

What is the meaning of the three dots in the object?


Piece of code from angularfire in firestore query. https://github.com/angular/angularfire/blob/master/docs/firestore/collections.md

return { id, ...data };


Solution

  • Why that's referred to as spread syntax! :)