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
Jamal Ayton-Brown
2,165 PointsI am unable to successfully compile the correct code for the Tuple Extra Credit task. Can anyone help?
Task: Write a function that accepts a Dictionary as parameter and returns a named tuple. The dictionary should contain the following keys: title, artist and album.
My current code is : func info (info: Dictionary) -> (title: String, artist: String, album: String) { let songInfo = ["Title": "DJ", "Artist": "Jamie Foxx", "Album": "Unpredictable"] return songInfo }
1 Answer
Joe Lingle
686 Pointstry return (songinfo["title"]!, songinfo["artist"]!, songinfo["album"]!)
Dennis Parussini
Treehouse Project ReviewerDennis Parussini
Treehouse Project ReviewerHave you found the solution yet?