Question d’entretien chez HCLTech

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