Series Description
In Lua, dictionaries and arrays are two types of data structures used to organize information. While variables can be used to store data, as projects become more complex, coders will often use data structures to meet their goals.
Objectives and Prerequisites
Learning Objectives | Learn common structures for storing sets of information, such as arrays and dictionaries as well as use cases for each structure. Be able to manipulate data structures, such as adding, removing, or returning values from a structure like an array. |
Prerequisites | Have a general understanding of variables in Lua. Feel comfortable typing and using conditional statements (if/else) and loops (for and while). |
Series Contents
Article | Description |
---|---|
Intro to Arrays | Learn how to store like groupings of data together with arrays. |
Loops and Arrays | Combine arrays with loops to be able to repeat code with a disappearing path trap. |
Making Changes to Arrays | Add and remove values in arrays by coding a script to manage a player's inventory |
Intro to Dictionaries | Organize complex sets of data with pairs using dictionaries. |
Pairs and ipairs | Iterate through arrays where you may not know the start or end points. |
Returning Values from Tables | Use pairs and ipairs to retrieve data from arrays and dictionaries. |