title: javascript .includes method not working as expected
body: <p>I am working with the stripe API to get a list of all used products in my subscriptions. I am going through all subscriptions and adding the used products into an array (or I'm trying to). </p>
  
  <p>I only want to add a product if it has not been added in yet. </p>
  
  <pre><code>router.get('/getusedproducts', asyncHandler(async(req,res,next) =&gt; {
    var products = [];
    for await (const subscription of stripe.subscriptions.list()) {
      for (i = 0; i &lt; subscription.items.data.length; i++) {
        var prod = subscription.items.data[i].plan.product;
        if (!products.includes[prod]){
          products.push(prod)
          console.log(prod);
        }
      }
    }
    res.send(products)
  }));
  </code></pre>
  
  <p>Currently, this piece of code isn't working as intended because I am still seeing the console log all product. Ideally, the check <code>!products.includes[prod]</code> should prevent that, but it isn't. I've read several discussion here on stack (<a href="https://stackoverflow.com/questions/7378228/check-if-an-element-is-present-in-an-array">1</a>)(<a href="https://stackoverflow.com/questions/41364383/if-an-element-already-exists-in-an-array-dont-add-it-again/41364474">2</a>)(<a href="https://stackoverflow.com/questions/49175939/node-js-array-includes-not-working-as-expected">3</a>)</p>
  
  <p>Not sure exactly how to compare the items in the array to the new ones I'm getting from JSON object to check if exists. </p>
  
  <p>Any help is appreciated. </p>