Home > @firebase/firestore > lite > QuerySnapshot > forEach
QuerySnapshot.forEach() method
Enumerates all of the documents in the QuerySnapshot.
Signature:
forEach(callback: (result: QueryDocumentSnapshot<T>) => void, thisArg?: unknown): void;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| callback | (result: QueryDocumentSnapshot<T>) => void | A callback to be called with a QueryDocumentSnapshotfor each document in the snapshot. | 
| thisArg | unknown | The thisbinding for the callback. | 
Returns:
void