Leetcode Check Palindrome Using Javascript To Change