Leetcode Check Palindrome Using Javascript Innerhtml