Accessing array elements
📖 Scenario: You are organizing a small fruit basket. You want to keep track of the fruits you have and check specific fruits by their position in the basket.
🎯 Goal: Learn how to create an array of fruits and access specific fruits by their position (index) in the array.
📋 What You'll Learn
Create an array of fruits with exact values
Create a variable to hold the index of the fruit to access
Access the fruit at the given index from the array
Print the accessed fruit
💡 Why This Matters
🌍 Real World
Arrays are used to store collections of items like fruits, names, or numbers where you want to access items by their position.
💼 Career
Understanding how to access array elements is fundamental for programming tasks such as data processing, user input handling, and working with lists in software development.
Progress0 / 4 steps