DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
get random entry from array javascript
const
rnd
=
(
arr
)
=>
{
return
arr
[
Math
.
floor
(
Math
.
random
(
)
*
arr
.
length
)
]
}
;
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#random
#entry
#array
#javascript
ADD COMMENT
Topic
COMMENT
Name
1+8 =
Submit