Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #duplicate #map #react #js
ADD COMMENT
Topic
Name
9+6 =