Find Distinct Elements In Array Javascript Methods Types