title: Delete elements in an array based on another array in Javascript
body: <p>I have just started learning the array methods in javascript. I want to delete elements in an array based on another array. I tried with the below approach but didn't get the expected result.</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>const array1 = [1, 2, 3, 4, 5, 6, 7];
  const array2 = [2, 4, 5];
  
  array2.forEach(a2 =&gt; {
    array1.filter(a1 =&gt; a1 !== a2)
  })
  
  console.log(array1);
  // actual output: Array [1,2,3,4,5,6,7];
  // expected output: Array [1,3,6,7]</code></pre>
  </div>
  </div>
  </p>
  <p>Which would be the best array method suited here?</p>