My question is simple. The array is claimed by a variable.
var array = [1,1,2,2,2,3,3,,4];
How can I get the new array like
array2 = [1,2,3,4]
My question is simple. The array is claimed by a variable.
var array = [1,1,2,2,2,3,3,,4];
How can I get the new array like
array2 = [1,2,3,4]
Copyright © 2021 Jogjafile Inc.
This might help (Unique values in an array). This answer is from above link
usage example: