Adapt Ready interview question

Remove Duplicates (js), Sleep function in js, SQL postgres query