Return the first recurring character in a string
The problem is similar to your other "two of something" problems, such as Palindrome and Find the elements that appear only once.  As in those problems, a Set is the appropriate data structure.

The main difference is that early exit is possible (when two of something is found) so we'd rather not be inside of a reduce. 

const firstRepeated = s =&gt; {
  const seen=new Set();
  for (var c of s) {
      if (seen.has(c)) return c; 
      else seen.add(c); 
  }
  return null;
}