Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Defining and Utilizing Functions in Lua

via CodeSignal

Overview

Functions are fundamental to clean and effective coding. This course demystifies the process of creating and using functions in Lua, covering everything from basic syntax and function parameters to understanding variable scope. By integrating these concepts, you'll be able to build more modular and error-resistant programs.

Syllabus

  • Unit 1: Defining Functions in Lua
    • Change the Function and Message
    • Spot the Function Mistake
    • Write Your First Lua Function
    • Write Your Own Lua Function
  • Unit 2: Function Parameters in Lua
    • Change the Parameter Name
    • Change the Default Greeting Name
    • Fix the Personalized Greeting Function
    • Fill in the Function Blanks
    • Write Your Own Greeting Function
  • Unit 3: Returning Values from Functions
    • Make the Function Name Match
    • Find the Missing Return Value
    • Complete the Trip Cost Function
    • Add Up the Hotel Prices
    • Write a Function That Returns a Value
  • Unit 4: Variable Scope in Lua
    • Change Variable Names and See Scope
    • Fix the Scope Bug
    • Practice Local and Global Variables
    • Mastering Local and Global Variables
  • Unit 5: Function Composition Practice
    • Change the Coupon Value
    • Fix the Ticket Price Calculation
    • Complete the Hotel Cost Calculator
    • Build the Final Price Calculator

Reviews

5.0 rating, based on 1 Class Central review

Start your review of Defining and Utilizing Functions in Lua

  • This is the final module at CodeSignal for Lua 101 / Fundamentals. I am sure beginners will love the easy slides and finish their first milestone with ease.

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.