we would check for the palindrome condition if yes we print True else False
var XA = xa . split ( " " ) ; XA . sort ( ) . reverse ( ) ; var XB = xb . split ( " " ) ; XB . sort ( ) . reverse ( ) ; if ( xa === XA . join ( " " ) || xb === XB . join ( " " ) ) return true ; } return false ; }