1

I have javascript validation method, its working good in firefox, but its not working in IE browser. I'm getting error as Object doesn't support this property or method .Please advise..

function validateChunk(s)
{
    return !!s.match(/^[a-z]+(?:\(\d+\))?$/);
}

function filterValid(v)
{
    return !v;
}

function testCases(str)
{
    var chunks = str.split(",");
    var validated = chunks.map(validateChunk);
    return (0 === validated.filter(filterValid).length);

}

jsfiddle

1 Answer 1

1

IE8 doesn't have .map() or .filter().

You can find code to fill in for them on the MDN site:

1
  • Is your IE9 running as IE8/7? Commented Dec 17, 2013 at 19:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.