Domanda di colloquio di CoStar Group

Write code in JavaScript about how to reverse a name?