Posted By

ericmuyser on 04/25/11


Tagged

CoffeeScript


Versions (?)

Array.remove


 / Published in: JavaScript
 

  1. Array::remove = (from, to) ->
  2. rest = @slice (to || from) + 1 || @length
  3. @length = if from < 0 then @length else from
  4.  
  5. return @push.apply(this, rest)

Report this snippet  

You need to login to post a comment.