DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
7+8 =
Submit