This method is taking each section and trying to find a palindrome and trying to check if the reverse is the same. code example
Example: check if palindrome
function isPalindrome(str) {
str = str.toLowerCase();
return str === str.split("").reverse().join("");
}