Error!
Success!

'contains' method in javascript, extend the String prototype and add y

0
kicks

'contains' method in javascript, extend the String prototype and add y  (Unpublished)

I was just wondering if there is any ‘contains’ method in javacsript. Because I had a string and wanted to search an specific word in that string, I could use indexOf method, but to keep my code more readable, I simply added a new method in the String prototype. You can see the code snippet...


Kicked By:
Drop Kicked By: