title: Firebase. LimitToFirst is not working but LimitToLast is working
body: <p>I am Writing a code to bring data of water from yesterday. but when I write LimitToLast its working perfectly but the data i am getting is not right so I write LimitToFirst instead of LimitToLast but after writing LimitToFirst my code start giving error in console.</p>
  <pre><code>cloudDb.collection(...).where(...).where(...).orderBy(...).limitToFirst is not a function
  </code></pre>
  <p>I have write the code like this</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var water1 = 0;
    cloudDb.collection('AKVO_RND').where("machine_id", "==", localStorage.getItem('machineid')).where("date", "&lt;=", date_yesterday).orderBy("date").limitToFirst(1).get().then(function (querySnapshot) {
      querySnapshot.forEach(function (doc) {
        water1 = doc.data().water;
  
      });
    })</code></pre>
  </div>
  </div>
  </p>