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 (retired) Variables and Constants Variables

Tiffany Nolte
Tiffany Nolte
247 Points

creating a variable?

how to create the variable what to use after var?

string_assignment.swift
var greeting = "hello"

2 Answers

Hi Tiffany.

You have to write "Hello" -> Upper Case letter "H"

Just advice for the future: when you are doing any kind of challange be sure to write the code as you are told to -> this means if it states you have to give the variable greeting the value of "Hello" then put in "Hello".

And you be having no problems in the future.

Happy Coding!!!

nWEBd

Tiffany Nolte
Tiffany Nolte
247 Points

hey, ok i'm still not sure why its saying its wrong, i put it as "Hello" but ill figure it out thanks! :)

Maybe change the "var" keyword to "char". Hope it helps!