Possible Duplicate:
IE9 array does not support indexOf
My Code:
var arrFruits = ['apple', 'banana', 'carrot', 'dates'];
var position = arrFruits.indexOf( 'carrot' );
position > -1 && arrFruits.splice( position, 1 );
alert( arrFruits );
The above code is displaying the result as apple, banana, dates
in Chrome
. But it is not working in IE9
.