Pregunta de entrevista de CoStar Group

Write code in JavaScript about how to reverse a name?