Campaign/Level 3 of 12
easyFrequency counter1 bug

Anagram Checker

QA says "aaz" and "zza" are being reported as anagrams.

isAnagram(a, b) returns true if b uses exactly the same letters as a, the same number of times.

Fix the code so every test passes. Keep the function name isAnagram.

Test cases

  • isAnagram("anagram", "nagaram") → true
  • isAnagram("rat", "car") → false
  • isAnagram("aaz", "zza") → false
  • isAnagram("", "") → true

Hints

each hint costs XP

Stuck? Hints go from a nudge to the exact fix.