In Chapter 1, Introduction to Lua, you learned how to set up Lua and Visual Studio Code. At the end of the chapter, we created a simple Hello World application. In this chapter, you will learn the basics of Lua programming. Topics such as variables, function data types, and loops are all going to be covered. By the end of this chapter, you should be familiar enough with Lua as a language to put together some simple programs.
If this is your first time programming, the syntax of Lua can get overwhelming fast. Many resources can be found on the official Lua site at https://www.lua.org/. For a quick example of Lua, check out http://tylerneylon.com/a/learn-lua/.
By the end of this chapter, you will will have a solid understanding of the following:
- Using variables
- Data types
- Working with functions
- Operators
- Code blocks
- Variable scope
- Code flow