Infosys interview question

Given an array of duplicates remove the duplicates.

Interview Answer

Anonymous

15 Apr 2019

Made a function with parameter array, turned into a Set data structure then back into an array, one liner. Then wrote unit tests to test the one liner. They wanted to know how I was going to compare the duplicates in Javascript but before I could revise my code the interview was over.