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 Functions in Swift Adding Power to Functions Function Parameters

Christen DeGennaro
Christen DeGennaro
2,796 Points

im having a hard time figuring out this one for functions

can anyone shed some light on what im doing wrong. thanks a ton

functions.swift
// Enter your code below
func getRemainder(a value: Int, b divisor: Int) -> Int {
  return (a % b)
}

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey Christen,

You're close. You just have the local and external parameter names mixed up. The external name is first, and the local is second. So, you just need to flip those around for both and you're good to go. :)

Keep Coding! :dizzy:

Christen DeGennaro
Christen DeGennaro
2,796 Points

oh cool, now i get it. thanks a bunch