Longest Palindromic Substring Length Leetcode Javascript Solution