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
Example:
isAnagram('listen', 'silent') → true
isAnagram('hello', 'world') → false
isAnagram('Astronomer', 'Moon starer') → true
Test Cases
Input: isAnagram('listen','silent')
Expected: 1
Input: isAnagram('hello','world')
Expected:
Input: isAnagram('Astronomer','Moon starer')
Expected: 1
Your Solution