Last active
August 22, 2020 14:26
-
-
Save vldvel/b08968e411963f1f86063addb5ce82bf 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 string1 = 'level'; | |
const string2 = 'house'; | |
const isPalindrome = stringToTest => stringToTest === stringToTest.split('').reverse().join(''); | |
isPalindrome(string1); // true | |
isPalindrome(string2); // false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment