title: How to check if data received from mongo database is empty?
body: <p>So, I'm trying to check if the data from my <code>.find()</code> is empty. I can check if it's null`, but I realize that when the .find() finds nothing, it returns an empty list. When I have an if statement saying</p>
  <pre><code>if (docs = []) {
  // code here
  } else {
  // code here
  }
  </code></pre>
  <p>It doesn't do the code and instead does the code if the documents got from the database. How can I make it check if it's an empty list?</p>