Last active
August 29, 2015 14:24
-
-
Save svahora/16967aa2383c72cc8f7c to your computer and use it in GitHub Desktop.
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) { | |
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