TandemSeven Interview Question

Write a function that returns the first duplicate value of an array.