title: Is there any way to remove item from array in javascript conditionally?
body: <p>I am trying to achieve the following, to remove 'gif' from the array if <code>enableGif</code> is true</p>
  <pre><code>const MediaTypes = ['ecard', 'gif', 'none'];
  </code></pre>
  <p>This array is looping and I wish to remove 'gif' from array if <code>enableGif</code> is true.</p>