js script that validates whether argument is a palindrome