Array : Javascript: How to find first duplicate value and return its index?

Published --