Skip to content

Instantly share code, notes, and snippets.

@queckezz
Last active December 17, 2015 04:28
Show Gist options
  • Save queckezz/5550440 to your computer and use it in GitHub Desktop.
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.
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