Skip to content

Instantly share code, notes, and snippets.

@why-jay
Last active August 29, 2015 14:11
Show Gist options
  • Save why-jay/24dd0e04eddbecece839 to your computer and use it in GitHub Desktop.
Save why-jay/24dd0e04eddbecece839 to your computer and use it in GitHub Desktop.
function filterNamesWithA(names) { // names is an array
return names.filter(function (name) { return name.indexOf('A') !== -1; });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment