EarnUp interview question

Write a function to compare two strings and return whether they are anagrams.