DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
compare two arrays and remove duplicates javascript
array1 = array1.filter(function(val) { return array2.indexOf(val) == -1; });
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#compare
#arrays
#remove
#duplicates
#javascript
ADD COMMENT
Topic
COMMENT
Name
3+2 =
Submit