Menu
Coddy logo textTech

Project Setup

Part of the Fundamentals section of Coddy's Lua journey — lesson 77 of 90.

challenge icon

Challenge

Easy

Over the next few lessons, you'll build a simple potion shop system

Create the foundation for a potion shop inventory system by setting up the main data structure. Create an empty table named inventory that will serve as the container for storing all the shop's magical potions.

After creating the empty table, print the length of the inventory table using the length operator # to verify that it starts empty. This will confirm that your potion shop is ready to be stocked with magical items in the upcoming lessons.

Try it yourself

-- TODO: Write your code here

-- Print the length of the inventory table
print(#inventory)

All lessons in Fundamentals