Pregunta de entrevista de DrFirst

Basic Javascript sorting question , palindrome