Accessing map values
📖 Scenario: You are managing a small store's inventory. You want to check the quantity of certain products quickly.
🎯 Goal: Build a Go program that creates a map of products and their quantities, then accesses and prints the quantity of a specific product.
📋 What You'll Learn
Create a map with product names as keys and quantities as values
Access the quantity of a specific product using its key
Print the quantity to the console
💡 Why This Matters
🌍 Real World
Maps are useful for storing and looking up data quickly, like product inventories or user information.
💼 Career
Understanding maps and how to access their values is essential for many programming tasks in software development.
Progress0 / 4 steps