Longest Nice Substring
A string s is nice if, for every letter of the alphabet that s contains, it appears both in uppercase and lowercase. For example, "ab" is nice because 'a' and 'b' appear in both cases, however, "aa" is not nice because 'a' appears only in lowercase.
Given a string s, return the longest nice substring of s. If there are multiple options, return the substring of the earliest occurrence. If there are none, return an empty string.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)