Start learning free

LESSON 31 OF 349 · FUNCTIONS I

Calling Functions: Buggy Code in Swift in Swift

Practice

Inside the code editor we've tried to define and call a function that would print the messages Hey coder! then Welcome back! to the console.

So when we ran the code, we expected it to print:

Hey coder!
Welcome back!

but it seems like we made some mistakes because when we run our code we get:

Welcome back!
Hey coder!

Assignment:

Your task is to fix our code such that it will print the desired output.

STEP 1 OF 1
    Ctrl + Enter to check

    Buggy Code Call Before Definition in Swift

    Keep going with SwiftAbout 340 step-by-step lessons, from your first line of code to coding interviews. Free to start.
    Start learning free