Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

define function to get random value from array

const randomValue = (list) => {
    return list[Math.floor(Math.random() * list.length)];
};
Source by attacomsian.com #
 
PREVIOUS NEXT
Tagged: #define #function #random #array
ADD COMMENT
Topic
Name
8+2 =