This tutorial will demonstrate how to find unique values in any given array and also how the elements return are in the same position as they were in the original subject array, i.e. only duplicates are removed, this is very important that the elements remain in their order but not shuffled.
Before ECMAScript version 5 two loops are required to do this. But with ECMAScript 6 it become a one liner operation.
// Outputs [1,2,3,one,two]