array with unique values javascript
var arr = [55, 44, 65,1,2,3,3,34,5];
var unique = [...new Set(arr)]
//just var unique = new Set(arr) wont be an arrayconst myArray = ['a', 1, 'a', 2, '1'];
const unique = [...new Set(myArray)]; // ['a', 1, 2, '1']let uniqueItems = [...new Set(items)]
Also in JavaScript:
- remove extra space in string javascript
- face-api without projects
- react add inline styles in react
- how to get MAC id of nodemcu
- modulus js
- get current url in jsp page
- nodejs cache data
- display none js
- javascript howto get xhr
- js scroll page horizontally with mouse wheel
- route in component react
- javascript extract array from object
- copy an object with object.assign
- convert date to string javascript
- iframe content zoom in and zoom out jquery
- css on keyboard enter click
- javascript open url
- angular google maps
- how to make a screen recording software with js
- copy link to clipboard
- javascript go to url
- allow cors express
- scalar
- js startswith