पुराने IE (≤8) में Array.indexOf नहीं है। समाधान:
1. jQuery उपयोग करें
jQuery.inArray(value, array [, fromIndex])
2. पॉलीफिल जोड़ें (कंडीशनल कमेंट)
<!--[if lte IE 8]>
<script>
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function(searchElement, fromIndex) {
// पॉलीफिल कार्यान्वयन
};
}
</script>
<![endif]-->
नोट: IE 9+ में नेटिव सपोर्ट है। आधुनिक विकास में IE ≤11 समर्थन आमतौर पर अनावश्यक है।