adicionado desafio do anagrama

This commit is contained in:
Heraldo Ecard Roque Filho 2021-08-18 18:12:18 -03:00
parent ac28a3158f
commit da382aab6c

34
10-anagrama/index.html Normal file
View File

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
/*
Faça um algoritmo que retorne se um palavra é anagram da outra
*/
function isAnagram(test, original) {
// implementar logica aqui
return ""
}
// Resultados esperados
console.log(isAnagram("foefet", "toffee"), true) // true
console.log(isAnagram("Buckethead", "DeathCubeK"), true) // true
console.log(isAnagram("Twoo", "WooT"), true) // true
console.log(isAnagram("dumble", "bumble"), false) // false
console.log(isAnagram("ound", "round"), false) // false
console.log(isAnagram("apple", "pale"), false) // false
</script>
</body>
</html>