Guest User

Untitled

a guest
May 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. function mutation(arr) {
  2. var a = arr[0].toLowerCase();
  3. var b = arr[1].toLowerCase();
  4.  
  5. for (i=0; i<b.length; i++){
  6. if (a.indexOf(b[i]) < 0){
  7. return false;
  8. }
  9. }
  10.  
  11. return true;
  12. }
  13.  
  14. mutation(["hello", "Hello"]);
Add Comment
Please, Sign In to add comment