Skip to content

Instantly share code, notes, and snippets.

@vldvel
Last active August 22, 2020 14:26
Show Gist options
  • Save vldvel/b08968e411963f1f86063addb5ce82bf to your computer and use it in GitHub Desktop.
Save vldvel/b08968e411963f1f86063addb5ce82bf to your computer and use it in GitHub Desktop.
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