HCLTech interview question

unique array in js