Perfect reversible string | This function basically checks if string is palindrome or not ; Iterate from left and right ; Driver Code
function isReversible ( str ) { var i = 0 , j = str . length - 1 ; while ( i < j ) { if ( str [ i ] != str [ j ] ) return false ; i ++ ; j -- ; } return true ; } var str = " " ; if ( isReversible ( str ) ) document . write ( " " ) ; else document . write ( " " ) ;