challenge-algorithms-Ana-Ca.../08-anagrama/index.html

34 lines
967 B
HTML
Raw Normal View History

2021-08-18 21:12:18 +00:00
<!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>