Answers for "remove duplicate value from map react js"

0

remove duplicate value from map react js

var sandwiches = ['turkey', 'ham', 'turkey', 'tuna', 'pb&j', 'ham', 'turkey', 'tuna'];
var deduped = Array.from(new Set(sandwiches));

// Logs ["turkey", "ham", "tuna", "pb&j"]
console.log(deduped);
Posted by: Guest on October-20-2021

Code answers related to "remove duplicate value from map react js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language