Driver Code
var str = " " ; var idx = possiblePalinByRemovingOneChar ( str ) ; if ( idx == - 1 ) document . write ( " " ) ; else if ( idx == - 2 ) document . write ( " " + " " ) ; else document . write ( " " + " " + idx ) ;