html
Challenge 3: The Minimalist Masterpiece
Write the shortest possible JavaScript function to solve the problem. The goal is to be as brief as possible without sacrificing clarity.
Challenge Description: Given a string, find the first duplicate in the string. If there is no duplicate, return -1.
Example Inputs:
Example Outputs:
Next Challenge: The Maximum Masterpiece | Back to CodeWars 2 | Back to CodeWars 1