Longest Substring Without Repetition Leetcode Javascript