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:

Sign up to request clarification or add additional context in comments.

1 Comment

Is your IE9 running as IE8/7?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.