Retail Insights interview question

finding the number is Palindrome or not in javascript