title: How to calculate the number of objects I get from the loop Javascript
body: <p>I filtered my set of users(array) with if(elem.id_verified). I now get 77 users objecta. I just want to take the number of these objects. I tried with console.log(this.numOfunverifiedUsers.length) but i get 77 underfined. My question is how to assemble all objects and get that number. Maybe my logic is going in the wrong direction.</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>this.users=response.data.users
  
  this.numOfunverifiedUsers = []
  
  this.users.forEach(elem =&gt; {
    if (elem.id_verified === 0) {
      this.numOfunverifiedUsers = elem
      console.log(this.numOfunverifiedUsers.length)
    }
  })</code></pre>
  </div>
  </div>
  </p>