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
contains is not supported in Chrome, but you could use a polyfill:
if (!String.prototype.contains) { String.prototype.contains = function(s) { return this.indexOf(s) > -1 } } 'potato'.contains('tat') // true 'potato'.contains('tot') // false