Pergunta de entrevista da empresa Crayon

How would you write palindrome in JavaScript.