-
ref.on( "value", snapshot => {
-
The JavaScript arrow function
=> allows us to write shorter function syntax.
-
snapshot.forEach( child => {
-
The method
child() gets another DataSnapshot for the location at the specified relative path.
Passing a relative path to the child() method of a DataSnapshot returns another DataSnapshot for the location at the specified relative path.
The relative path can either be a simple child name (for example, "Ash" ) or a deeper, slash-separated path (for example, "users/3/name" ).
If the child location has no data, an empty DataSnapshot (that is, a DataSnapshot whose value is null) is returned.
|
|
⇓ Showing all users
|