HCLTech Interview Question

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