title: Firebase Realtime Database - foreach - expected to receive a value at the end of arrow function
body: <p>I am getting the warning 'expected to receive a value at the end of arrow function'  once I call foreach function to go thru each child and update the record that matches.</p>
  
  <pre><code>var email = req.body.email;
  var name = req.body.name;
  var result = false;
      userRef.once('value', snapshot =&gt; {
          result = snapshot.forEach(child =&gt; {
              if (child.val().email === email){
                  console.log(child.key);
  
                  admin.database().ref('users/'+child.key).update({name: name}).then(result =&gt;{
                      res.status(200).json({message: 'Updated'});
                      return true;
                  })
                  .catch(err =&gt; {
                      console.log(err);
                      return false;
                  });
                  return true;
              }
          });
          if (result === false){
              res.status(200).json({message: 'User does not exist'});
          }
      });
  </code></pre>
  
  <p>I receveid from http post the parameter email, now I use 'foreach' to search for the user that has such email. Once I find it, I update its name with the other parameter 'name' and I return true to get out the foreach loop. However I receive a warning message about I am missing one return, which is in the case the code never gets into the if statemente. In a normal situation I would take the length of my array and I would return false once the loop reaches its end but here I can't.</p>
  
  <p>My database:</p>
  
  <pre><code>users
      -Lbq98URniAej2TkWBhG
             email: "pepe@san.com"
             name: "Pepe"
      -Lbq9GC1A131De-iumI0
             email: "pipa@boca.com"
             name: "Pipa10"
  </code></pre>