Pregunta de entrevista de Retail Insights

finding the number is Palindrome or not in javascript