Why javascript contains property is not working in chrome browser? I have tried that Contains Property in javascript.It is working fine in Mozila Firefox Browser. But It is
I think you should be using indexOf
var ClearFilterValue = 'family Schools';
if(ClearFilterValue.indexOf("family") !== -1) {
alert('Success');
}
Also not sure if you should be making a polyfill as pretty much no browser seems to support it anyways https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/contains
None of IE's support it, Chrome apparently starting at 30, FF starting at 19, and i doubt mobile browsers support it either