Skip to Content
Hello World
Hello World

Take a look at the Hello.swift file in the code editor that is placed in the middle of the screen. It’s a Swift program!

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

In Swift, 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.



Press Run to see this program in action.

What message appeared in the terminal?

Folder Icon

Take this course for free

Already have an account?