Skip to content

Instantly share code, notes, and snippets.

@jamesattard
Created December 29, 2016 17:35
Show Gist options
  • Select an option

  • Save jamesattard/8364bfe63605b02e7016c5546c104dc7 to your computer and use it in GitHub Desktop.

Select an option

Save jamesattard/8364bfe63605b02e7016c5546c104dc7 to your computer and use it in GitHub Desktop.
mutation.js Free Code Camp
function mutation(arr) {
var checkArr = arr[1].toLowerCase().split("");
for (var i=0; i<arr[1].length; i++) {
if (arr[0].toLowerCase().indexOf(checkArr[i]) == -1) {
return false;
}
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment