A coding challenge to check if a string is a palindrome in JavaScript