Function that returns true if str [ i ... j ] is a palindrome
function isPalindrome ( str , i , j ) { while ( i < j ) { if ( str [ i ] !== str [ j ] ) { return false ; } i ++ ; j -- ; } return true ; }