Created
December 29, 2016 17:35
-
-
Save jamesattard/8364bfe63605b02e7016c5546c104dc7 to your computer and use it in GitHub Desktop.
mutation.js Free Code Camp
This file contains hidden or 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 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