Added a js implementation of isPalindrome.