Created
October 13, 2015 16:20
-
-
Save ArielLeslie/e28f4befb8123e2df251 to your computer and use it in GitHub Desktop.
Mutatations
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 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