Start learning free

LESSON 29 OF 348 · FUNCTIONS I

Defining Functions: Buggy Code in Scala in Scala

Practice

Inside the code editor we've tried just to define a function (without calling the function) that would print the message Hey, Andy! whenever called.

It seems like we made some mistakes because when we run our code we get an error.


Assignment:

Your task is to fix our function definition such that no errors will be produced.

STEP 1 OF 1
    Ctrl + Enter to check

    Buggy Code Defining A Function in Scala

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