Remove first occurence of an element using JavaScript or Lodash

Solution 1:

By wanting the first one of duplicate following items, you could use Array#lastIndexOf along with a check of the actual index.

const
    data = ["a", "a", "b", "c", "d", "e"],
    result = data.filter((v, i, a) => i !== a.lastIndexOf(v));

console.log(result);