Les paso un ejemplo de lo que quiero hacer.
Código HTML:
<body>Hola soy <SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var a = Math.random() + ""
var rand1 = a.charAt(5)
quotes = new Array
quotes[1] = "Juan"
quotes[2] = "Pedro"
quotes[3] = "Fernando"
quotes[4] = "Gabriel"
quotes[5] = "Alejandro"
quotes[6] = "Horacio"
quotes[7] = "Hugo"
quotes[8] = "Manuel"
quotes[9] = "Ariel"
quotes[0] = "Federico"
var quote = quotes[rand1]
document.write(quote);
// End -->
</SCRIPT> tengo <SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var a = Math.random() + ""
var rand1 = a.charAt(5)
quotes = new Array
quotes[1] = "20"
quotes[2] = "21"
quotes[3] = "24"
quotes[4] = "26"
quotes[5] = "27"
quotes[6] = "30"
quotes[7] = "31"
quotes[8] = "34"
quotes[9] = "49"
quotes[0] = "52"
var quote = quotes[rand1]
document.write(quote);
// End -->
</SCRIPT> años y vivo en <SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var a = Math.random() + ""
var rand1 = a.charAt(5)
quotes = new Array
quotes[1] = "Barcelona"
quotes[2] = "Madrid"
quotes[3] = "Pekin"
quotes[4] = "Buenos Aires"
quotes[5] = "La Paz"
quotes[6] = "París"
quotes[7] = "Berlin"
quotes[8] = "Los Angeles"
quotes[9] = "Rio de Janeiro"
quotes[0] = "Sidney"
var quote = quotes[rand1]
document.write(quote);
// End -->
</SCRIPT>.
</body>
Esto, al ejecutarlo, me tira por ejemplo:
Hola soy Hugo tengo 24 años y vivo en Pekin.
El tema es que busco que en vez de 10 valores, pueda meter valores infinitos o ilimitados.
Esa era mi pregunta.
De vuelta muchísimas gracias.