// removeDuplicates ES6 const uniqueArray = oldArray.filter((item, index, self) => self.indexOf(item) === index);