Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

advanced data manipulation javascript

var array = [“blue”, “green”, “green”, “black”, “orange”, “blue”, “green”, “red”];var uniqueArray = [];uniqueArray = array.filter((element, index, array)=>{ return array.indexOf(element) === index;})console.log(uniqueArray)["blue", "green", "black", "orange", "red"]
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #advanced #data #manipulation #javascript
ADD COMMENT
Topic
Name
3+3 =