vendredi 28 octobre 2016

How can I create a list with random parameters on certain text places? (Javascript)

To be honest I want to code a program that does that but if it isn't possible I would like to know if there is any other non-manual way. What I am basically saying is that I have a format like this one:

==========================================
Head: *******:*******
==========================================
Parameter 1: ********
Parameter 2: *******
Parameter 3: *******
Parameter 4: *******
Parameter 5: * [***, ***, ***]
==========================================
******** -> *********
==========================================

And I want it printed multiple times with stuff extracted at random from a database to input it in the place of the asterisks. The database limit is 500. I understand that it requires a for loop etc. but I am clueless as to how to make it get a random element from a list and how to input the said list within the code instead of writing each element one by one (The list is in .txt format).




Aucun commentaire:

Enregistrer un commentaire