title: Clean way to remove element from javascript array (with jQuery, coffeescript)
body: <p>There are many questions about this, not least:
    <a href="https://stackoverflow.com/questions/450717/jquery-version-of-array-contains">jQuery version of array contains</a>, <a href="https://stackoverflow.com/questions/3231453/in-javascript-how-do-i-remove-an-element-from-an-array-of-objects">a solution with the splice method</a> and many more. However, they all seem complicated and annoying.</p>
  
  <p>With the combined powers of javascript, jQuery and coffeescript, what is the very cleanest way to remove an element from a javascript array? We don't know the index in advance. In code:</p>
  
  <pre><code>a = [4,8,2,3]
  a.remove(8)     # a is now [4,2,3]
  </code></pre>
  
  <p>Failing a good built-in method, what is a clean way of extending javascript arrays to support such a method? If it helps, I'm really using arrays as sets. Solutions will ideally work nicely in coffeescript with jQuery support. Also, I couldn't care less about speed, but instead prioritize clear, simple code.</p>