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