Leetcode Check Palindrome Using Javascript Innerhtml New Line