Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Randomizing a List

Hey everyone,
I'm pretty new with Sugarcube. I am trying to figure out how to randomize an array?


  • Sorry, this sounded unclear. I mean, I want to change the order of items in the array randomly.
  • You don't state which series of SugarCube (1.x or 2.x) you are using so I will assume it is the 2.x series, and that you are using the latest 2.10.0 version.

    You can use the <Array>.shuffle() method to randomly change the order of the elements within an array, the linked documentation includes an example of how to use it.
  • Thanks!! I am using 2x
Sign In or Register to comment.