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 trialamri khalid
1,960 PointsChallenge Task 1 of 2 In this task we're going to declare two strings. First, declare a constant named name and assig
whats the problem here.?
// Enter your code below
let name
let greeting = "hi there"
let interpolatedGreeting = "\(greeting), \(name)"
2 Answers
Jennifer Nordell
Treehouse TeacherHi there! You're fairly close here so I'm going to give some hints.
- The constant
name
should be assigned a string containing your name - The code for the first step should only be 2 lines
- The constant
greeting
should be correctly capitalized with "Hi there, " - The name variable should be interpolated inside the
greeting
constant - The
interpolatedGreeting
constant is unnecessary and not requested by the challenge
Good luck and let us know if you're still stuck!
Josue Gisber
Courses Plus Student 9,332 Pointsinitialize your constant name