Start learning free

LESSON 37 OF 671 · FUNCTIONS I

Parameters & Arguments: Buggy Code II in Go

Practice

Inside the code editor we've tried to write a function that takes a person's name as an argument and prints a tailored welcome message for that person.

Then, we welcomed Andy and John by calling the function for each of them.

When the code is fixed, it should print:

Welcome, Andy!
Welcome, John!

But the current code prints the same name twice. The function should use its name parameter, not a hard-coded name.

Assignment:

Your task is to fix the code so it prints the desired output.


STEP 1 OF 1
    Ctrl + Enter to check