Back to Collection Builder
OOP Studio Ages 9-15

Collection Challenge: Supply Drop

Choose loop code that activates every object in a collection.

10-15 minOOP ChallengeArrays + Loops
Your task

Three supply objects are stored in the powerUps array. Complete the loop so every object runs activate().

Why a loop?

It repeats the command for every object without naming Star, Shield, and Key separately.

Win

Activate all three array slots with one correct line of JavaScript.

Complete the Loop

Which line reaches every object?

for (let powerUp of powerUps) {
}

Choose the missing line.

See the complete JavaScript
powerUps Array

Supply objects waiting

powerUps[0]Magic star power-upMagic Star · 10 points
powerUps[1]Shield power-upShield · 5 points
powerUps[2]Magic key power-upMagic Key · 3 points
0 of 3 activated