Skip to content

Instantly share code, notes, and snippets.

@ArielLeslie
Created October 13, 2015 16:20
Show Gist options
  • Save ArielLeslie/e28f4befb8123e2df251 to your computer and use it in GitHub Desktop.
Save ArielLeslie/e28f4befb8123e2df251 to your computer and use it in GitHub Desktop.
Mutatations
function mutation(arr) {
arr[0] = arr[0].toLowerCase();
arr[1] = arr[1].toLowerCase();
for (i = 0; i < arr[1].length; i++){
if(arr[0].indexOf(arr[1].charAt(i)) < 0){
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