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 trialSHANTANU RANA
Courses Plus Student 524 Pointsarrays
create a string array and assign the following tasks to it .
2 Answers
Jari Koopman
Python Web Development Techdegree Graduate 29,349 PointsHi Shantanu,
The code you need is builde up out of two things, at first declaring a variable, and second adding things to it. Lets start with the declaration:
var todo =
than we will put the array with things to do in to the var:
var todo = ["Learn Swift","Build App","Deploy App"]
You now have got a variable called todo, containing an array with strings, the string is market with "" and the array with [] I hope you can go further with learning swift now!
Brett Kim
11,576 PointsTry var (name) = ["thing", "thing2", "thing3"]
Maureen O'Neal
12,930 PointsMaureen O'Neal
12,930 PointsPlease quote the exact question and your code, plus maybe the class that it's for too. It helps! :)