Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Swift Functions and Optionals Functions Syntax and Parameters

I need help with this challenge

how do i get this right? please help!

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

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,631 Points

What is the code you tried?

Amit covers the syntax here starting at 1:30. I suggest you review the video to complete the challenge.

:dizzy:

Oscar G
Oscar G
2,647 Points

Hello Jurgen, println is no longer used in swift. Use print instead.

Jason Anders
Jason Anders
Treehouse Moderator 145,631 Points

Hey Oscar Gutierrez,

He is currently in the Swift Track, so println is still what is needed to pass the challenge. "plrintln" is deprecated in Swift 2 and Xcode 7.0 and later. If using Swift 1.x and Xcode 6 or earlier, println is still needed... print will create an error.

:dizzy: