Longest Substring Without Repetition Leetcode Javascript Question