Learn

Take a look at the main.lua file in the code editor that is placed in the middle of the screen. It’s a Lua program!

When learning a new language, tradition suggests that our first program prints to the screen: Hello, world!.

In Lua, this can be done in a single line:

print("Hello, world!")

Everything inside the double quotes will be printed to the terminal.

The terminal is a window that allows people to interact with a computer program. The terminal is the black panel on the right. It should be blank right now, but we’ll change that in a moment.

Note: Don’t worry if you don’t understand something, everything introduced in this lesson is explained in the rest of this course.

Instructions

1.

Press Run to see this program in action.

What message appeared in the terminal?

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?