SyntaxStudy
Sign Up

Anagram Check

JAVASCRIPT Medium +25 XP
Problem Description
Write a function `isAnagram(str1, str2)` that returns `true` if the two strings are anagrams of each other (same letters, different order), ignoring case and spaces.

Example:
isAnagram('listen', 'silent') → true
isAnagram('hello', 'world') → false
isAnagram('Astronomer', 'Moon starer') → true

Test Cases

1
Input: isAnagram('listen','silent')
Expected: 1
2
Input: isAnagram('hello','world')
Expected:
3
Input: isAnagram('Astronomer','Moon starer')
Expected: 1
Your Solution