Javascript arrays can contain duplicates — which is fine most of the time, but can sometimes cause some issues. For example, if an array is supposed to only contain unique user IDs, but is taken from a data source which may contain duplicates: let userIds = [ '123-123', '123-123', '234-234'…