Previously, you've learned how to create arrays, access items using their index positions, and change existing items in arrays.
Let's practice combining these fundamental array operations to strengthen your skills!
Engagement Message
Ready to test your array mastery?
Type
Fill In The Blanks
Markdown With Blanks
Create an array of three favorite foods (pizza
, tacos
, and ice cream
in that order), then access and print the second item:
Suggested Answers
- "pizza"
- "tacos"
- "ice cream"
- 1
Type
Swipe Left or Right
Practice Question
Match each operation with what it does by swiping left or right:
Labels
- Left Label: Accessing Items
- Right Label: Changing Items
Left Label Items
- myArray[0]
- colors[2]
- scores[1]
- names[3]
Right Label Items
- myArray[0] = "new value"
- colors[2] = "purple"
- scores[1] = 95
- names[3] = "Alice"
