To loop over a command some number of times, you can use a Loop command with Javascript Expressions.
1. Click the plus button of the parent command to the one(s) you want to loop.
2. Under Advanced, add a Loop command.
3. Select, drag and drop the commands you want to loop under the new Loop command. You want to ensure that the command is nested inside the loop command as shown below. Do not worry about the error, we will correct it in the next step.
4. For the In option of the Loop command, input $createArray(#) to repeat the loop # times.