Last active
December 17, 2015 04:28
-
-
Save queckezz/5550440 to your computer and use it in GitHub Desktop.
Returns true or false depending on whether a string contains a char or not.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function contains( element, search ) { | |
return element.indexOf( search ) != -1 ? true : false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment