Leetcode Find All Palindrome Substrings In Javascript