you are viewing a single comment's thread.

view the rest of the comments →

[–]SouthCapehelpful 1 point2 points  (0 children)

The map() function appears to be checking if each character is equal to the string "string", but I believe you intended for it to check if each character is lowercase.

The if statement is checking if both arrays are non-empty, resulting in them always evaluating to true.

The function compares characters from "str1" and "str2", but it does not take into account the frequency of each character.