J520V520

J520V520

function isAnagram(str1, str2) {
              if (str1.length !== str2.length) {
                  return false;
              }
              for (var i = 0; i < str1.length; i++) {
                  var indx = str2.indexOf(str1[i]);
                  if (indx === -1) {
                      return false;
                  }
                  str2 = str2.substring(0, indx) + str2.substring(indx + 1);
              }
              return true;
          }   susunnnnnn ulağğn.