Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Swift Functions and Optionals Functions Creating a Function

This doesn't make sense... I've inputed the necessary information, What else is there to input here?

I don't know what else to place in here...

What else do you need to place the code?

greeting.swift
func greeting() {
  println("Hello")
}
greeting()

what is the question asked ?

1 Answer

If the task asked you to modify the function and assign a parameter to it you would have done this

          func greeting(data: String ){
             println("Hello \(data))")
        }

then you call it greeting("Apple ") Therefore the result should be hello Apple. Hope that helps.