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 Syntax and Parameters

Dont understand What i'm doing wrong?

Can someone help please? Thanks,

parameters.swift
func greeting(person: String) -> String {
    return ("Hello") 
}

2 Answers

Which stage of the challenge are you stuck on?

func greeting(person: String) {
    println("Hello \(person)")
}
greeting("Tom")
Dean Bowen
Dean Bowen
1,158 Points

Put a # sign in front of person to give it an external label. You then have to call with a label as well,but I am having trouble getting this teaching module to accept it. It runs on my X-Code, but does not have an output so I must have something wrong too....