KoderLabs interview question

How would you check if an array has duplicates