Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript add unique values to array

const arr = Array.from({length: 5}, v => Math.floor(Math.random() * 100));
console.log(arr) // Array with random numbers of length 5 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #add #unique #values #array
ADD COMMENT
Topic
Name
5+8 =