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 Build a Weather App with Swift (Retired) Pulling Data From the Web Creating a URL

Gregory Serfaty
Gregory Serfaty
37,140 Points

Convert int to string

Hi For the challenge we need to convert the courseID in string, i try to cast it, to put quote but nothing match, i have always the message " You need to convert the courseID variable to a string and use it when creating courseURL."

Some one have an idea?

Thx.

2 Answers

R J
R J
1,779 Points

Try this

String(CourseID)

Add

Let x = String(CourseID)

then substitute x in the code

Gregory Serfaty
Gregory Serfaty
37,140 Points

Really weird i do that after my post and now it is work so good Thx

R J
R J
1,779 Points

Keep in mind that the String in String(CourseID) is case sensitive

so string(CourseID) doesn't work

the first s in String must be upper case