title: Coffeescript remove array value by index
body: <p>I have an array of objects and I want to remove a value by its index. I have a method, to which the value to be removed is passed, that finds the passed parameter value:</p>
  
  <pre><code>remove: (val) -&gt;
    for el, index in @arr
      if el is val
        # remove el from @arr...
  </code></pre>
  
  <p>The <a href="http://coffeescript.org/" rel="nofollow noreferrer">CoffeeScript website</a> says quite clearly that in order to replace the element I want, I have to do <code>@arr[index] = 'something'</code>, but nothing is said for removing it entirely.</p>