Code to Get Unique Elements of an Array using ES6 Syntax
Posted on February 6, 2019 in Algorithms, JavaScript by Matt Jennings
const arr1 = [2, 2, 4, 2, 6, 4, 7, 8]
const counts = {}
let i
for (i = 0; i < …