Really thought I had this one, but only works for half of cases

function mutation(arr) {
  arr[0] = arr[0].toLowerCase();
  arr[0] = arr[0].split(""); 
  arr[1] = arr[1].toLowerCase();
  arr[1] = arr[1].split(""); 
  for (let i=0; i<arr[1].lengtth; i++){
    if (!arr[0].includes(arr[1][i])){
      return false;
  return true;

mutation(["HELLO", "HEY"]);

It would work in all cases if you checked your spelling of the word “length” :wink:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.