console.log("Dadas duas palavras, algoritmo identifica se elas são anagramas");

function ehAnagrama(palavra1, palavra2) {

    if(palavra1.length != palavra2.length) 
        return false;

    const tamPalavras = palavra1.length;
    if(!palavra1.includes(palavra2))
        return false;
    
}

console.log(`${ehAnagrama("amor", "roma")}`);

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: