Randomize Colors & Buttons as Arrays

My student is trying to make it so that the buttons in her program show up with random colors with a single function or loop. I know how to make lists and arrays, but App Lab doesn’t want to create a list that can be called back as IDs–only strings and variables. I know we can use the setProperty function with the rbg set to the randomNumber blocks, but I’m having a hard time getting the buttons to be treated as a list. I want to create a single ID for all of the buttons and I can’t really do that without using const which isn’t available on App Lab. Help?

Your request reminds me of a lesson that existed in the previous version of the course. By being intentional about the name of the element, such as button1, button2, button3 etc. you can create a variable that uses the for loop’s iterator to generate the string of the button name. (perhaps something like “button” + i) then this variable can be used in the call to setProperty.

Here is the practice level from 2022. Perhaps this will meet the students’ needs?