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

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,858 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,858 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: