Created
December 5, 2021 19:36
-
-
Save joynal/9500a34897ced53932c7a8ae23cc83df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isTwin = (first, second) => { | |
// Impelement this function | |
}; | |
isTwin('Hello', 'World'); // false | |
isTwin('Silent', 'Listen'); // true | |
isTwin("Good", "OODG"); // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
const twin = (t1, t2) => {
if (t1.length === t2.length) {
const arr = t1.toLowerCase().split("");
const arr2 = t2.toLowerCase().split("");
} else {
return false;
}
};
console.log(twin("Hell", "leho")); //true
console.log(twin('Hello', 'World')); // false
console.log(twin('Silent', 'Listen')); // true
console.log(twin("Good", "OODG")); //true