JavaScript by Victor Talmacinschi • June 21, 2022
const array = [ '🍎', '🍌', '🍊', '🍋', '🍉', '🍇', '🍓', '🍈', '🍒', '🍑', '🍍', '🥭', '🥥', '🍅', '🍆', '🥑' ];
// convert the array to a Set
const set = new Set(array);
// log the set to the console
console.log(set);
0
16.419
JavaScript by Victor Talmacinschi • June 21, 2022
const foods = ['🌭', '🍕', '🥓', '🌭', '🍔']
// convert array to set
const foodsSet = new Set(foods)
console.log(foodsSet)
// Set(4) {🌭, 🍕, 🥓, 🍔}
0
16.419