how to check for palindrome in string javascript code example
Example: javascript palindrome check
const isPalindrome = str => str === str.split('').reverse().join('');
// Examples
isPalindrome('abc'); // false
isPalindrom('abcba'); // true