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 Basics Swift Types String Manipulation

Abdul Fawaz
Abdul Fawaz
115 Points

"Make sure the value you are assigning to greeting is an interpolated string" i have no idea on what this means

I have tried assigning them to interpolated string and but still says the same thing repeatedly.

strings.swift
// Enter your code below

let namlet name = "abdul"

let greeting = " Hi, there"

let interpolated =  " name: abdul , greeting: Hi, there";

2 Answers

Magnus Hållberg
Magnus Hållberg
17,232 Points

An interpolated string is a string that can also hold values from other strings or other compatible types. The syntax looks like this:

let myString = Hi
let myInterpolatedString = “\(myString) there
// this would print “Hi there”

I suggest you rewatch the videos, if missed this you probably missed other important things. Good luck

Abdul Fawaz
Abdul Fawaz
115 Points

thank you very much for your help Magnus, i appreciate your time.