The following code can be run without a problem in Chrome, but throws the following error in Internet Explorer 11.
Object doesn\'t support property or
I also recently faced the prob. I solved using ^ which is similar to startwith in jquery. Say,
jquery
var str = array[a].id; if (str.startsWith('REP')) {..........}
we can use
if($("[id^=str]").length){..........}
Here, str is id of element.