Skip to content

Instantly share code, notes, and snippets.

@easierbycode
Created January 4, 2012 22:44
Show Gist options
  • Save easierbycode/1562621 to your computer and use it in GitHub Desktop.
Save easierbycode/1562621 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment