Name | Code (Block) | Code (Text) |
---|---|---|
Random List Access Pattern |
Many App Lab projects run in the following way.
This pattern allows a user to see random elements in a list. In order to make it work, create an index variable and a list. Then generate a random number between 0 and the length of the list minus one and set the index to that value. Then update the screen.
Found a bug in the documentation? Let us know at documentation@code.org