This code represents getting unique values from an array. This code returns unique values after removing the duplicate element. “sample array” represents the array variable. This will work only javascript version after ES5.
[…new Set(sample array)]
This code represents getting unique values from an array. This code returns unique values after removing the duplicate element. “sample array” represents the array variable. This will work only javascript version after ES5.
[…new Set(sample array)]