• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[SOLVED]How to randomly get a String from an array in a random amount of times.

 
Andrew Sepulveda
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know how to randomly get a String from an array, but the BIG money question I am asking for today is how to get a random string from an array by a Random amount of cycles, and printing it on the screen.

Here is what I did so far.



I am assuming I would have to use a For loop, which I did try below.



But doing something beyond that is where I am stumped in doing.

My desired output would be:

random String, random String, random String, random String

another ex:

Plates, Silver Coins, Dressing Table, Candy Wrapper, Chipped Bat

Please note that I want all of the randomly picked strings stored in ONE variable.



EDIT: solved it. My idiotic brain did not realize to just add the below code in the for loop.


 
Andrew Sepulveda
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the double post, and the useless thread, but I solved it .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic