Remove duplicates from Array

Let's start with following array:
const array = ['🍺', '🥛',  '🍷', '🍺','🍺', '🎂'];
Set object allows us to store unique values of any type, whether primitive values or complex object references:
const unique = [...new Set(array)];
// => ►(4) ["🍺", "🥛", "🍷", "🎂"]
Filter method returns a new array with all elements that pass the test provided:
array.filter((item, index) => array.indexOf(item) === index);
// => ►(4) ["🍺", "🥛", "🍷", "🎂"]
Reduce method executes a provided reducer function on each element of the array. By far, this is the coolest solution as not only allows you to have custom reducer funtion defined, but control de desired output format also straight from within. Below an example of reduce() making use of "includes" in reducer and outputing to an array:
array.reduce((acc, val) => acc.includes(val) ? acc : [...acc, val], []);
// => ►(4) ["🍺", "🥛", "🍷", "🎂"]
This is how .reduce() does its magic while iterating through the array:
array.reduce((accumulated, value) => {
  if (accumulated.includes(value)) {
    console.log(`${value} is already in array, do NOT add it!`);
    return accumulated;
  } else {
    console.log(`${value} is not in array, add it!`);
    return [...accumulated, value];
  }
}, []);
/* =>
 * 🍺 is not in array, add it!
 * 🥛 is not in array, add it!
 * 🍷 is not in array, add it!
 * ❷ 🍺 is already in array, do NOT add it!
 * 🎂 is not in array, add it!
 */