undefined element at the end. My array definition looked something like this:
var arr = [1, 2, 3,]
The problem is the trailing comma at the end. IE 8 thinks that the comma means there is an extra element in the array and because it is not specified it becomes
undefined. Then if you go through all the element and try to call some function on them, you will get an error stating that the desired function is not available on that element. To fix this, just remove the trailing comma.
var arr = [1, 2, 3]