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

check work option is not working

while m going to compile my code by clicking on the option of check work it gives me the result "Communication Problem"..thats y m not able to move on ..please tell me what is happening

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

}

2 Answers

Hi Farwa! I'll love to give this a try and help you more on!

Honestly your syntax looks great. My only concern is that the line "println" in swift 2.0 is no longer necessary we now use "print" much more easy right!?

I suggest reloading your website and rewriting the function again. That might help.

func greeting() {
print("Hello")
}

I hope this helps! -roman

thank you..jazakAllah