Leetcode Check Palindrome Using Javascript For Navigation