Code Studio · Level 6
Array Challenge: Load the Rocket 🚀
Make an array of supplies, then loop through it to load the rocket. Pack 3 or more items and it blasts off!
Write your supply list.
Example code
let missionItems = ["star", "key", "rocket"];
for (let i = 0; i < missionItems.length; i++) {
pack(missionItems[i]);
}
star
key
rocket
moon
shield
dragon
unicorn
cookie
…any other word becomes a 📦 crate!
Launch Pad
Mission Control
Cargo loaded: 0 · need 3 to launch
Run your code to load supplies…
Waiting for your array…
🎉 Liftoff! Array challenge complete.
Your for loop walked through every item in the array and loaded it onto the rocket. That is exactly how programs handle lists of data!