Write a function called findLongestSubstring, which accepts a string and returns the length of the longest substring with all distinct characters.
I don’t understand how the use-cases answers come to be?
findLongestSubString("thisisawesome") // 6 (my answer is 5 because "isawe" is longest), the rest of use cases im baffled as well.
findLongestSubString("thecatinthehat") // 7
findLongestSubString("longestsubstring") // 8
findLongestSubString("thisishowwedoit") // 6