easierbycode
1/4/2012 - 10:44 PM

Array.indexOf in IE

Array.indexOf in IE

# teach stupid IE to embrace Array.indexOf
unless Array.indexOf
  Array::indexOf = (item) ->
    for i in [0..this.length-1]
      return i  if this[i] == item
    return -1