Skip to content

Instantly share code, notes, and snippets.

@svahora
Last active August 29, 2015 14:24
Show Gist options
  • Save svahora/16967aa2383c72cc8f7c to your computer and use it in GitHub Desktop.
Save svahora/16967aa2383c72cc8f7c to your computer and use it in GitHub Desktop.
function mutation(arr) {
var one = arr[0].toLowerCase();
var two = arr[1].toLowerCase().split('');
for(x=0; x<two.length; x++) {
if(one.indexOf(two[x]) === -1) {
return false;
}
} return true;
}
mutation(['hello', 'hey']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment