Function to check if string is palindrome or not
function isPalindrome ( s ) { for ( let i = 0 ; i < s . length ; ++ i ) { if ( s [ i ] != s [ s . length - i - 1 ] ) { return false ; } } return true ; }