Publicis Sapient interview question

Question on JavaScript prototype and object reference and how to find duplicate letter in the word