title: Check if element is in Array via includes() in Vue / Node.js
body: <p>I want to check if my barcode string is in the existing array of barcodes.
  I found out that there is a function for that in Javascript called includes().</p>
  
  <p>So I tried the following:</p>
  
  <pre><code>var Numbers = [1,2,3,4,5,6,7]
  console.log(Numbers.includes(1)) // True
  </code></pre>
  
  <p>That works perfectly.
  But my version:</p>
  
  <pre><code>data() {
  return {
    form: {
      items: [ //this is the array what I want to check
      ],
      //...
    },
  }
  </code></pre>
  
  <p>In one of my functions I have this little snippet:</p>
  
  <pre><code>.then(response =&gt; {
        barcode = response.data;
        if (barcode.length &gt; 0)
          if(!this.form.items.includes(barcode)) //THIS DON'T WORK
            this.form.items.push(barcode[0]);
        else
          this.$message({
          message: 'Wrong Barcode!',
          type: 'warning'
        }) 
    })
  </code></pre>
  
  <p>The array is empty because I push elements in it each time when I use the scanner.</p>