Check for Anagrams

Published by romancoding in

Create a function that takes two strings and returns either true or false depending on whether they're anagrams or not.

Examples

isAnagram("cristian", "Cristina") ➞ true

isAnagram("Dave Barry", "Ray Adverb") ➞ true

isAnagram("Nope", "Note") ➞ false

Notes

  • Should be case insensitive.
  • The two given strings can be of different lengths.
Watch a quick demo on how Edabit works.