Answers for "random string fromarray"

4

random string from array javascript

var textArray = [
    'song1.ogg',
    'song2.ogg'
];
var randomNumber = Math.floor(Math.random()*textArray.length);
Posted by: Guest on July-02-2020
1

get random element from string array java

String random = (fruits[new Random().nextInt(fruits.length)]);
Posted by: Guest on January-06-2021
0

randomly pick string from array

echo ['green', 'blue', 'red'][rand(0,2)];
Posted by: Guest on June-28-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language