Vernost interview question

Write a program in javascript to find duplicate in a string