Pregunta de entrevista de HCLTech

Write a function to reverse a string in JavaScript. Write a function to check if a given number is a palindrome.