function checkAnagram(str1, str2)
{
let s1 = str1.trim().split(" ").join("").split("").sort();
let s2 = str2.trim().split(" ").join("").split("").sort();
if(s1.length!=s2.length) console.log("False");
else{
result = true;
for(let i=0; i<s1.length; i++){
if(s1[i]!=s2[i]){
result = false;
break;
}
}
if(result) console.log("True");
else console.log("False");
}
}